WordPress/wp-includes/customize
Weston Ruter 7b0dbf49fc Customize: Improve behavior and extensibility of theme loading and searching.
* Introduce `WP_Customize_Themes_Section::$filter_type`, which has built-in functionality for `local` and `remote` filtering. When this set to `local`, all themes are assumed to be loaded from Ajax when the section is first loaded, and subsequent searching/filtering is applied to the loaded collection of themes within the section. This is how the core "Installed" section behaves - third-party sources with limited numbers of themes may consider leveraging this implementation. When this is set to `remote`, searching and filtering always triggers a new remote query via Ajax. The core "WordPress.org" section uses this approach, as it has over 5000 themes to search.
* Refactor `filterSearch()` to accept a raw term string as input. This enables a feature filter to be used on a section where `filter_type` is `local`.
* Refactor `filter()` on a theme control to check for an array of terms. Also sort the results by the number of matches. Rather than searching for an exact match, this will now search for each word in a search distinctly, allowing things like tags to rank in search results more accurately.
* Split `loadControls()` into two functions for themes section JS: `loadThemes()` to initiate and manage an Ajax request and `loadControls()` to create theme controls based on the results of the Ajax call. If third-party sections need to change the way controls are loaded, such as by using a custom control subclass of `WP_Customize_Theme_Control`, this allows them to use the core logic for managing the Ajax call and only override the actual control-creation process.
* Introduce `customize_load_themes` filter to facilitate loading themes from third-party sources (or modifying the results of the core sections).
* Bring significant improvements to the installed themes search filter.

Props celloexpressions.
Amends [41648].
See #37661.
Fixes #42049.

Built from https://develop.svn.wordpress.org/trunk@41807


git-svn-id: http://core.svn.wordpress.org/trunk@41641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 07:09:52 +00:00
..
class-wp-customize-background-image-control.php Customize: Improve custom background properties UI. 2016-10-26 06:52:29 +00:00
class-wp-customize-background-image-setting.php
class-wp-customize-background-position-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-code-editor-control.php Accessibility: CodeMirror editing areas minor improvements. 2017-09-24 16:00:46 +00:00
class-wp-customize-color-control.php Accessibility: Improve the color picker UI accessibility, interaction, and generated markup. 2017-09-03 16:02:46 +00:00
class-wp-customize-cropped-image-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-custom-css-setting.php Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion. 2017-09-13 06:08:47 +00:00
class-wp-customize-date-time-control.php Customize: Allow controls to be created with pre-instantiated Setting object(s), or even with plain Value object(s). 2017-10-04 20:02:49 +00:00
class-wp-customize-filter-setting.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-header-image-control.php Customize: Improve the wording for Header Image control intro. 2017-10-04 19:35:47 +00:00
class-wp-customize-header-image-setting.php Customize: Reuse existing non-auto-draft posts and existing auto-draft posts in the customized state with matching slugs when applying starter content. 2016-12-02 00:25:41 +00:00
class-wp-customize-image-control.php Customize: Let media control button labels better automatically reflect the specified MIME type. 2017-09-20 21:24:46 +00:00
class-wp-customize-media-control.php Customize: Let media control button labels better automatically reflect the specified MIME type. 2017-09-20 21:24:46 +00:00
class-wp-customize-nav-menu-auto-add-control.php Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
class-wp-customize-nav-menu-control.php Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
class-wp-customize-nav-menu-item-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-nav-menu-item-setting.php Customize: Provide validation feedback for invalid Custom Link URLs in nav menu items. 2017-10-03 03:43:47 +00:00
class-wp-customize-nav-menu-location-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-nav-menu-locations-control.php Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
class-wp-customize-nav-menu-name-control.php Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
class-wp-customize-nav-menu-section.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-nav-menu-setting.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-nav-menus-panel.php Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
class-wp-customize-new-menu-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-new-menu-section.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-partial.php Docs: Remove "since since" and "one one" dittography from inline comments. 2017-09-09 13:53:42 +00:00
class-wp-customize-selective-refresh.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-sidebar-section.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-site-icon-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-customize-theme-control.php Customize: Fix invalid HTML and aria-describedby values. 2017-10-03 15:44:46 +00:00
class-wp-customize-themes-panel.php Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets. 2017-10-07 06:00:54 +00:00
class-wp-customize-themes-section.php Customize: Improve behavior and extensibility of theme loading and searching. 2017-10-10 07:09:52 +00:00
class-wp-customize-upload-control.php Customize: move WP_Customize_Control subclasses to wp-includes/customize, they load in the exact same place. 2015-10-24 18:57:25 +00:00
class-wp-widget-area-customize-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-form-customize-control.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00