This filter allows the Core editor to be replaced by an entirely different editor (coughcoughGUTENBERGcough).
Props azaozz, who is supposed to be on sabbatical right now.
Fixes#42119.
git-svn-id: https://develop.svn.wordpress.org/trunk@41829 602fd350-edb4-49c9-b593-d223f7449a82
Trashing a changeset via `wp_trash_post()` does not have the desired result since it mutates `post_content` (via Kses) and the `post_name` (even though it is a UUID).
Props dlh.
See #39896, #42030.
Fixes#42175.
git-svn-id: https://develop.svn.wordpress.org/trunk@41824 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a change in behaviour introduced by [41629].
The host is set to an empty string when it isn't defined, this continues existing behaviour. In particular, the mysqli library treats a `null` host as being the same as `localhost`, which is not always the intended behaviour.
Props birgire, markjaquith, pento.
Fixes#41722.
git-svn-id: https://develop.svn.wordpress.org/trunk@41820 602fd350-edb4-49c9-b593-d223f7449a82
On newer versions of MySQL, an error was being thrown when creating a table with an index that we wanted to be silently truncated.
To avoid this, the test now tries to use a newer InnoDB file format where available, and skips the test when that happens.
Props pento, danielbachhuber, straussd.
Fixes#41716.
git-svn-id: https://develop.svn.wordpress.org/trunk@41818 602fd350-edb4-49c9-b593-d223f7449a82
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.
Fixes#42121.
git-svn-id: https://develop.svn.wordpress.org/trunk@41811 602fd350-edb4-49c9-b593-d223f7449a82
For values of `fields` like `id=>parent`, the keys of the array must be
maintained as part of the query results.
Introduced as part of #40496. See [38667], [40513].
Props miyauchi, dany2217, pcarvalho.
Fixes#41293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41809 602fd350-edb4-49c9-b593-d223f7449a82
* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@41807 602fd350-edb4-49c9-b593-d223f7449a82
The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.
Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes#6531.
git-svn-id: https://develop.svn.wordpress.org/trunk@41806 602fd350-edb4-49c9-b593-d223f7449a82
* Increase PHP execution time limit prior to issuing loopback requests where are themselves given timeouts to ensure PHP file can be reverted.
* Output scrape messages on success and failure so that absence of either can also be flagged as an error condition.
* Forward browser's HTTP Basic Auth credentials in loopback requests to admin and home URL.
* Display more helpful message when loopback request fails.
Amends [41721].
See #21622.
Fixes#42102.
git-svn-id: https://develop.svn.wordpress.org/trunk@41805 602fd350-edb4-49c9-b593-d223f7449a82
* Restore previously-focused element when overlay notifications are dismissed.
* Allow notifications to be dismissed via keyboard.
Amends [41667].
See #42110, #35210, #39896.
git-svn-id: https://develop.svn.wordpress.org/trunk@41803 602fd350-edb4-49c9-b593-d223f7449a82
It doesn't look like `wp_register_sidebar_widget()` ever used a global named `$wp_register_widget_defaults`. It does however make use of `$wp_registered_widget_controls` now.
See [8960], [30776].
Props upadalavipul.
Fixes#41592.
git-svn-id: https://develop.svn.wordpress.org/trunk@41798 602fd350-edb4-49c9-b593-d223f7449a82
* Open the door for future browser history feature in #28536, which is currently not feasible when customize-loader is used.
* Remove customizer-loader from being used on admin screens for Dashboard, Themes, non-shiny theme install/update.
* Keep the customize-loader functionality available for plugins, for the time being. It may become deprecated.
* Ensure `return` param in customizer links in Themes screen update to reflect `search` updated by `pushState`.
* Persist `return` when reloading Customizer due to theme switch, autosave restoration, or changeset trashing.
* Use `location.replace()` instead of changing `location.href` when trashing.
* Hide theme browser while Themes screen is loading when there is a `search` to prevent flash of unfiltered themes.
* Use throttling instead of debouncing when searching themes to ensure that screen is updated immediately on page load.
* Fix encoding and decoding of `search` param between URL and search field.
* Add support for dismissing autosaves when closing customize-loader, when it is used by plugins.
* Skip sending changeset UUID to customize-loader for population in browser location if changeset branching is not enabled.
See #28536.
Fixes#40254.
git-svn-id: https://develop.svn.wordpress.org/trunk@41797 602fd350-edb4-49c9-b593-d223f7449a82
* Prevent autoloading an existing draft/future changeset when theme not active.
* Add missing notifications container to Themes panel.
* Remove deactivation of themes panel when selected status is not publish.
* Show notification in Themes panel when themes cannot be previewed and disable preview buttons.
* Reject installTheme call when theme preview not available.
* Return promise from installTheme and eliminate use of global events in favor of promises.
Props westonruter, melchoyce, zoonini.
See #37661, #39896.
Fixes#42126.
git-svn-id: https://develop.svn.wordpress.org/trunk@41788 602fd350-edb4-49c9-b593-d223f7449a82
The second parameter is supposed to be the version number, the replacement function should be the third parameter.
Props milindmore22, jdgrimes.
Fixes#41094.
git-svn-id: https://develop.svn.wordpress.org/trunk@41787 602fd350-edb4-49c9-b593-d223f7449a82
- Fix keeping text selection and scroll position when there are embeds from URL.
- Add editor setting to disable keeping selection and scroll position.
- Remove dependency on Underscore.js.
- Fix error in the Text widget editor.
Props biskobe.
Fixes#42059, see #40854.
git-svn-id: https://develop.svn.wordpress.org/trunk@41783 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a bug introduced by the upgrade to MediaElement.js, where code
calling `wp.media.mixin.removePlayer()` would result in a JS error.
Props rafa8626, afercia.
Fixes#41787.
git-svn-id: https://develop.svn.wordpress.org/trunk@41781 602fd350-edb4-49c9-b593-d223f7449a82