wordpress-develop/tests/phpunit/tests/customize
Weston Ruter 5ea07785b3 Customize: Reduce peak memory usage by JSON-encoding settings and controls individually.
When there are hundreds of settings and controls (e.g. nav menu items and widget instances) the resulting object that is JSON-encoded can become very large, and `wp_json_encode()` can consume a lot of memory to serialize it. By breaking down the serialization into multiple calls the peak memory usage can be kept in line.

Moves logic out of `wp-admin/customize.php` into the `WP_Customize_Manager` class with new methods:

 * `is_ios()`
 * `get_document_title_template()`
 * `get_preview_url()`/`set_preview_url()`
 * `get_return_url()`/`set_return_url()`
 * `get_autofocus()`/`set_autofocus()`
 * `customize_pane_settings()`

Includes unit tests for these methods, for which the logic was formerly untestable in `customize.php`.

Fixes #33898.


git-svn-id: https://develop.svn.wordpress.org/trunk@34269 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 19:41:35 +00:00
..
manager.php Customize: Reduce peak memory usage by JSON-encoding settings and controls individually. 2015-09-17 19:41:35 +00:00
nav-menu-item-setting.php Customizer: Introduce customize_nav_menu_available_item_types and customize_nav_menu_available_items filters. 2015-07-22 20:28:03 +00:00
nav-menu-setting.php Customizer: Fix failing tests on PHP 5.2 after [33488]. 2015-07-31 13:01:16 +00:00
nav-menus.php Update Test_WP_Customize_Nav_Menus::test_available_items_template() after [33413]. 2015-07-26 09:14:06 +00:00
panel.php Add JS templates for Customizer Panels and Sections. 2015-05-30 00:02:13 +00:00
section.php Add JS templates for Customizer Panels and Sections. 2015-05-30 00:02:13 +00:00
setting.php Use assertFalse() rather than assertNull() in Tests_WP_Customize_Setting::test_is_current_blog_previewed(). 2015-06-18 14:07:35 +00:00
widgets.php In PHPUnit test classes, parent::tearDown() should be the last thing done in tearDown() methods. 2015-03-05 13:14:15 +00:00