WordPress/wp-admin/js
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
..
widgets Widgets: Fix jshint error in media widget. 2017-10-05 00:58:48 +00:00
accordion.js Menu customizer: More clearly separate search results from available items. 2015-07-29 23:40:25 +00:00
accordion.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
code-editor.js Code Editor: Remove `scrollIntoView` of editor's cursor line upon focus to prevent jumping issues for editor scroll position. 2017-09-17 03:58:44 +00:00
code-editor.min.js Code Editor: Remove `scrollIntoView` of editor's cursor line upon focus to prevent jumping issues for editor scroll position. 2017-09-17 03:58:44 +00:00
color-picker.js Accessibility: Improve the color picker UI accessibility, interaction, and generated markup. 2017-09-03 16:02:46 +00:00
color-picker.min.js Accessibility: Improve the color picker UI accessibility, interaction, and generated markup. 2017-09-03 16:02:46 +00:00
comment.js Docs: Add documentation for `wp-admin/js/comment.js`. 2017-06-15 13:02:40 +00:00
comment.min.js Comment status box: Move focus back to Edit link when changing the date. 2015-07-26 02:26:24 +00:00
common.js Permalinks: Change structure tag button state more reliably. 2017-09-26 08:24:46 +00:00
common.min.js Permalinks: Change structure tag button state more reliably. 2017-09-26 08:24:46 +00:00
custom-background.js Docs: Add `wp-admin/js/custom-background.js` documentation. 2017-06-15 13:24:41 +00:00
custom-background.min.js Customize: Improve custom background properties UI. 2016-10-26 06:52:29 +00:00
custom-header.js Fix JSHint errors in custom-header.js and custom-background.js. 2013-11-14 05:40:11 +00:00
customize-controls.js Customize: Improve behavior and extensibility of theme loading and searching. 2017-10-10 07:09:52 +00:00
customize-controls.min.js Customize: Improve behavior and extensibility of theme loading and searching. 2017-10-10 07:09:52 +00:00
customize-nav-menus.js Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
customize-nav-menus.min.js Customize: Improve the menu creation flow. 2017-10-05 02:22:49 +00:00
customize-widgets.js Customize: Improve usability of Customize JS API. 2017-10-04 06:48:46 +00:00
customize-widgets.min.js Customize: Improve usability of Customize JS API. 2017-10-04 06:48:46 +00:00
dashboard.js Accessibility: Improve the Dashboard Nearby Events widget `wp.a11y.speak()` messages. 2017-10-02 19:25:45 +00:00
dashboard.min.js Accessibility: Improve the Dashboard Nearby Events widget `wp.a11y.speak()` messages. 2017-10-02 19:25:45 +00:00
edit-comments.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
edit-comments.min.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
editor-expand.js Docs: improve JS docs for `editor-expand.js` 2017-08-24 17:48:45 +00:00
editor-expand.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
editor.js Editor: Fix JSHint errors after [41783]. 2017-10-06 19:12:49 +00:00
editor.min.js Editor: Fix JSHint errors after [41783]. 2017-10-06 19:12:49 +00:00
farbtastic.js Farbtastic 1.3u. Props flashingcursor. fixes #14707 2010-11-11 16:34:22 +00:00
gallery.js JS: in event callbacks replace the very outdated `return false` with `preventDefault()`. 2015-10-09 01:27:27 +00:00
gallery.min.js JS: in event callbacks replace the very outdated `return false` with `preventDefault()`. 2015-10-09 01:27:27 +00:00
image-edit.js Media: ensure JavaScript initialized when media edit screen is loaded directly. 2017-01-27 18:30:43 +00:00
image-edit.min.js Media: ensure JavaScript initialized when media edit screen is loaded directly. 2017-01-27 18:30:43 +00:00
inline-edit-post.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
inline-edit-post.min.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
inline-edit-tax.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
inline-edit-tax.min.js Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:52:52 +00:00
iris.min.js Customize: Add hue-only mode to color picker. 2016-10-25 22:33:30 +00:00
language-chooser.js Language chooser imporvements. 2014-08-04 20:47:16 +00:00
language-chooser.min.js Language chooser imporvements. 2014-08-04 20:47:16 +00:00
link.js Fix JSHint errors in 5 files. 2013-11-15 05:16:09 +00:00
link.min.js Temporarily remove CSS preprocessing until we can get our Ruby dependency sorted out. 2013-11-13 21:45:11 +00:00
media-gallery.js Media: Add some docs to `media-gallery.js` RIP. 2016-08-20 22:59:29 +00:00
media-gallery.min.js Temporarily remove CSS preprocessing until we can get our Ruby dependency sorted out. 2013-11-13 21:45:11 +00:00
media-upload.js jQuery: Replace the use of the `.size()` method with the `.length` property. 2016-01-13 16:17:27 +00:00
media-upload.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
media.js Docs: Add `wp-admin/js/media.js` documentation. 2017-06-15 15:37:53 +00:00
media.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
nav-menu.js Menus: Visually hide the menu item edit link text in a consistent way. 2017-08-03 22:12:43 +00:00
nav-menu.min.js Menus: Visually hide the menu item edit link text in a consistent way. 2017-08-03 22:12:43 +00:00
password-strength-meter.js Users: Check zxcvbn is defined before calling. 2016-07-01 12:45:29 +00:00
password-strength-meter.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
plugin-install.js Administration: Thickbox: Fix conflicts with the Plugin details and native Thickbox modals. 2017-09-09 14:14:43 +00:00
plugin-install.min.js Administration: Thickbox: Fix conflicts with the Plugin details and native Thickbox modals. 2017-09-09 14:14:43 +00:00
post.js Docs: Correct a number of typos/spelling mistakes in inline comments. 2016-10-25 00:38:35 +00:00
post.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
postbox.js Docs: Add documentation for `wp-admin/js/postbox.js`. 2016-09-22 18:47:31 +00:00
postbox.min.js Editor, editor-expand: adjust the sidebar position when moving a postbox from one column to another. 2016-06-08 22:37:29 +00:00
revisions.js JavaScript: when starting Backbone history, stop if previously started. 2017-02-17 22:00:42 +00:00
revisions.min.js JavaScript: when starting Backbone history, stop if previously started. 2017-02-17 22:00:42 +00:00
set-post-thumbnail.js Revert a part of [32673] that caused a fatal error with `SCRIPT_DEBUG` disabled. 2015-06-01 04:14:25 +00:00
set-post-thumbnail.min.js Revert a part of [32673] that caused a fatal error with `SCRIPT_DEBUG` disabled. 2015-06-01 04:14:25 +00:00
svg-painter.js Final SVG painter fixes. 2013-12-05 22:01:10 +00:00
svg-painter.min.js Bump grunt-contrib-uglify from 1.0.1 to 2.0.0 2016-11-03 05:40:34 +00:00
tags-box.js Taxonomy: Convert tag cloud in Tags meta box to a list (`<ul>`) for better semantics and accessibility. 2017-09-22 11:28:44 +00:00
tags-box.min.js Taxonomy: Convert tag cloud in Tags meta box to a list (`<ul>`) for better semantics and accessibility. 2017-09-22 11:28:44 +00:00
tags-suggest.js Quick/Bulk Edit: Fix the Tag suggestions position on the Bulk Edit textarea. 2017-03-31 16:35:45 +00:00
tags-suggest.min.js Quick/Bulk Edit: Fix the Tag suggestions position on the Bulk Edit textarea. 2017-03-31 16:35:45 +00:00
tags.js Docs: improve JS docs for `tags.js` 2017-08-24 17:52:44 +00:00
tags.min.js Taxonomy: Add a "delete" button on term edit page. 2017-05-12 19:26:41 +00:00
theme-plugin-editor.js File Editor: Increase robustness of fatal error checking when saving PHP file edits. 2017-10-10 05:27:49 +00:00
theme-plugin-editor.min.js File Editor: Increase robustness of fatal error checking when saving PHP file edits. 2017-10-10 05:27:49 +00:00
theme.js Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in `top` window. 2017-10-09 16:04:48 +00:00
theme.min.js Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in `top` window. 2017-10-09 16:04:48 +00:00
updates.js Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer. 2017-09-29 20:13:50 +00:00
updates.min.js Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer. 2017-09-29 20:13:50 +00:00
user-profile.js Login: Password reset - add hide icon & confirm weak password checkbox. 2017-09-21 21:29:48 +00:00
user-profile.min.js Login: Password reset - add hide icon & confirm weak password checkbox. 2017-09-21 21:29:48 +00:00
user-suggest.js Autocomplete for the new site admin email. Better than trying to remember which email address you used. 2014-01-27 23:10:12 +00:00
user-suggest.min.js Autocomplete for the new site admin email. Better than trying to remember which email address you used. 2014-01-27 23:10:12 +00:00
widgets.js Accessibility: Improve the sidebar toggles in the Widgets screen. 2017-09-27 16:29:44 +00:00
widgets.min.js Accessibility: Improve the sidebar toggles in the Widgets screen. 2017-09-27 16:29:44 +00:00
word-count.js Docs: Use 3-digit, x.x.x style semantic versioning for `@since` entries in `wp-admin/js/word-count.js`. 2017-01-06 22:12:39 +00:00
word-count.min.js Editor: word count: better names for types. 2015-07-27 11:19:26 +00:00
wp-fullscreen-stub.js Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
wp-fullscreen-stub.min.js Editor: 2015-06-01 17:38:29 +00:00
xfn.js JSHint and coding style fixes for xfn.js. 2013-11-14 21:58:10 +00:00
xfn.min.js JSHint and coding style fixes for xfn.js. 2013-11-14 21:58:10 +00:00