This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.
Props spacedmonkey.
Fixes#40669.
git-svn-id: https://develop.svn.wordpress.org/trunk@41849 602fd350-edb4-49c9-b593-d223f7449a82
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.
Props spacedmonkey.
See #40669.
git-svn-id: https://develop.svn.wordpress.org/trunk@41848 602fd350-edb4-49c9-b593-d223f7449a82
Previously, shortcodes were being counted when the `init` action fired, even though it's possible for shortcodes to be registered later than that.
By leaving the counting until just before the script is printed, we get a more accurate list of shortcodes.
Props ocean90.
Fixes#41917.
git-svn-id: https://develop.svn.wordpress.org/trunk@41844 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the (W) logo on the single site login screen linked to wordpress.org, with an appropriate `title` attribute, but the link text was the blog name.
To fix this discrepency, the link text is now the same as the `title` attribute.
Props pento, obrienlabs, afercia, flixos90, lukecavanagh, and the infinite stack of bikesheds that WordPress is balanced upon.
Fixes#34625.
git-svn-id: https://develop.svn.wordpress.org/trunk@41843 602fd350-edb4-49c9-b593-d223f7449a82
[41784] was a workaround for a bug in PHPUnit 6.4. PHPUnit 6.4.1 has since been released, which includes a fix for this.
Fixes#42124.
git-svn-id: https://develop.svn.wordpress.org/trunk@41841 602fd350-edb4-49c9-b593-d223f7449a82
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.
Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes#42024.
git-svn-id: https://develop.svn.wordpress.org/trunk@41839 602fd350-edb4-49c9-b593-d223f7449a82
On narrower devices, input fields are too short to fit the number of default digits they contain. This widens the fields and also breaks each height and width attribute onto a new line for better usability, using some terrible CSS trickery. My apologies.
Props: Toru, Presskopp, desrosj, xkon, ryelle, melchoyce.
Fixes#34539.
git-svn-id: https://develop.svn.wordpress.org/trunk@41836 602fd350-edb4-49c9-b593-d223f7449a82
JSON files don't need a particular indent style, this was just inherited from the jQuery `.editorconfig`, that we based ours on.
`package.json` is staying in the 2-space-indent group for now, due to npm 3 and 4 having issues. Upgrading to npm 5 will allow us to remove `package.json`, too.
Props netweb.
Fixes#40946.
git-svn-id: https://develop.svn.wordpress.org/trunk@41835 602fd350-edb4-49c9-b593-d223f7449a82
Also fix issue with initial visibility of notice when there are no menus.
Amends [41823].
Props bpayton, melchoyce, westonruter.
See #42116.
Fixes#42113.
git-svn-id: https://develop.svn.wordpress.org/trunk@41832 602fd350-edb4-49c9-b593-d223f7449a82
Because "unlink" now appears contextually when editing a link, let's remove it from the toolbar.
Props azaozz, ahortin, swissspidy, afercia.
Fixes#36569.
git-svn-id: https://develop.svn.wordpress.org/trunk@41831 602fd350-edb4-49c9-b593-d223f7449a82
Fixes an issue where hovering over the warning icon didn't work if there were multiple warnings on the same line of code. Also updates the cursor from "pointer" to "help" when hovering over warnings and errors.
Props joyously, obenland.
Fixes#42129.
git-svn-id: https://develop.svn.wordpress.org/trunk@41830 602fd350-edb4-49c9-b593-d223f7449a82
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