Commit Graph

37628 Commits

Author SHA1 Message Date
Gary Pendergast 1eda9654da Login: Swap `bloginfo()` usage for `get_bloginfo()`.
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.



git-svn-id: https://develop.svn.wordpress.org/trunk@41850 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:09:42 +00:00
Boone Gorges 5c8c480d22 Bump 'posts' query cache incrementor when modifying postmeta.
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
2017-10-12 15:19:30 +00:00
Boone Gorges 6ce4e413ce Invalidate comment query cache when modifying comment meta.
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
2017-10-12 14:58:58 +00:00
Weston Ruter ee44859ee4 Post WordPress 4.9 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@41847 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 06:24:55 +00:00
Weston Ruter 6c23cbeb94 WordPress 4.9 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@41846 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:42:43 +00:00
Weston Ruter 88c2d8ba25 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.


git-svn-id: https://develop.svn.wordpress.org/trunk@41845 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:16:40 +00:00
Gary Pendergast 5e9991f7e4 Editor: Improve the accuracy of the list of shortcodes that the word count ignores.
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
2017-10-12 05:09:10 +00:00
pento a0a05744a9 Login: On the single site login screen, match the logo link text with the title.
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
2017-10-12 04:56:05 +00:00
Weston Ruter 8e9f37dde1 Twenty Seventeen: Fix positioning of edit shortcuts when partials are nested inside a frontpage panel.
Fixes #41557.


git-svn-id: https://develop.svn.wordpress.org/trunk@41842 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:43:27 +00:00
Gary Pendergast 5fac6cc075 Build/Test Tools: Revert [41784].
[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
2017-10-12 04:27:22 +00:00
Weston Ruter bd5eb9f8cd Widgets: Update default `link_type` for Gallery widget from `none` to `post` for consistency with `wp.media.galleryDefaults`.
Props bor0.
See #41914.
Fixes #41985.


git-svn-id: https://develop.svn.wordpress.org/trunk@41840 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:20:32 +00:00
Weston Ruter bb63758be8 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* 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
2017-10-12 04:00:15 +00:00
Mel Choyce baa8937d58 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.


git-svn-id: https://develop.svn.wordpress.org/trunk@41838 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:54:59 +00:00
Mel Choyce 4e13eb54c2 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.


git-svn-id: https://develop.svn.wordpress.org/trunk@41837 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:52:42 +00:00
Mel Choyce cf7cba3194 Settings: Widen image size input fields on Media Settings page.
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
2017-10-12 03:47:29 +00:00
Gary Pendergast b57742018a General: Remove `.jshintrc` and `*.json` from the 2-space-indent `.editorconfig` group.
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
2017-10-12 01:57:45 +00:00
Mel Choyce 9f7e06e855 Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.


git-svn-id: https://develop.svn.wordpress.org/trunk@41834 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 21:13:33 +00:00
Mel Choyce f6d84dbe31 Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.


git-svn-id: https://develop.svn.wordpress.org/trunk@41833 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:44:18 +00:00
Weston Ruter 725a161456 Customize: Vary description for nav menu locations control based on whether it is shown during menu creation.
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
2017-10-11 19:37:10 +00:00
Mel Choyce dfd140a7ba TinyMCE: Remove "Unlink" icon from toolbar
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
2017-10-11 19:13:09 +00:00
Mel Choyce e700ea5afe Code Editors: Improve cursor interactions on warning notices.
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
2017-10-11 18:24:10 +00:00
Gary Pendergast 3b734f0e65 Editor: Add the `replace_editor` filter.
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
2017-10-11 12:05:21 +00:00
Pascal Birchler 4a23f58215 Database: Add translators comment for error message in `wpdb::prepare()`.
Props felipeelia.
Fixes #42142.


git-svn-id: https://develop.svn.wordpress.org/trunk@41828 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 08:34:34 +00:00
Weston Ruter b3bd3ababd Widgets: Update video widget embed failure notice to indicate streams other than YouTube and Vimeo are allowed.
Amends [41759].
See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41827 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 06:21:54 +00:00
Weston Ruter 1c9c97fd02 Customize: Make sure `saved` state is initially `false` when restoring autosave revision so that Save button will be enabled.
Amends [41597].
Props sayedwp.
See #39896.
Fixes #42143.


git-svn-id: https://develop.svn.wordpress.org/trunk@41826 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:56:40 +00:00
Weston Ruter 06961964c4 Customize: Correct docs for `WP_Customize_Manager::changeset_uuid()` after changes in [41626].
Props dlh.
Fixes #42174.


git-svn-id: https://develop.svn.wordpress.org/trunk@41825 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:44:15 +00:00
Weston Ruter 6abe575a2a Customize: Introduce `WP_Customize_Manager::trash_changeset_post()` to reduce duplication and ensure proper changeset trashing logic.
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
2017-10-11 05:41:14 +00:00
Weston Ruter 1cff26c4b7 Customize: Add notice for when there are no nav menus created yet, prompting user to create one.
Props bpayton, melchoyce, westonruter.
Fixes #42116.


git-svn-id: https://develop.svn.wordpress.org/trunk@41823 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:27:05 +00:00
Weston Ruter 3c7a504ed4 Customize: Prevent outputting `value` attribute if already supplied among `input_attrs`.
This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.


git-svn-id: https://develop.svn.wordpress.org/trunk@41822 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 04:25:57 +00:00
Dion Hulse 4b2b97a3b3 Upgrades: Remove the usage of `each()` from `WP_Upgrader` for PHP 7.2 compatibility.
Props chrisvendiadvertisingcom, dd32.
Fixes #41524


git-svn-id: https://develop.svn.wordpress.org/trunk@41821 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 04:23:49 +00:00
Gary Pendergast 0e5b75b8be Database: When parsing the host, leave the port and socket as `null` if they're not defined.
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
2017-10-11 00:09:47 +00:00
Weston Ruter 32e7a51a01 Plugin Editor: Revert superseded changes to `activate_plugin()` and `plugin_sandbox_scrape()`.
Partially revert [41671], [41561], [41560].
See #21622.
Fixes #39766.


git-svn-id: https://develop.svn.wordpress.org/trunk@41819 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 00:02:30 +00:00
Gary Pendergast 6411029d0d Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2.
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
2017-10-10 23:45:35 +00:00
Weston Ruter 77c6dc7fd8 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.


git-svn-id: https://develop.svn.wordpress.org/trunk@41817 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 23:44:35 +00:00
Weston Ruter 32224a5c2a Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.


git-svn-id: https://develop.svn.wordpress.org/trunk@41816 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 21:03:38 +00:00
Weston Ruter 23a18572b0 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.


git-svn-id: https://develop.svn.wordpress.org/trunk@41815 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 20:52:50 +00:00
Weston Ruter 89aef850c2 Widgets: Clear dirty flag on widgets admin screen when widget is deleted to prevent irrelevant confirmation prompt when leaving.
Props hazimayesh, felipeelia.
Amends [41352], [41813].
See #23120, #42127.
Fixes #41894.


git-svn-id: https://develop.svn.wordpress.org/trunk@41814 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 20:38:22 +00:00
Weston Ruter 6bbf13852b Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.


git-svn-id: https://develop.svn.wordpress.org/trunk@41813 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 18:06:24 +00:00
Weston Ruter cdba279149 Customize: Adjust "Menu Locations" labels for singular/plural.
Props felipeelia.
Fixes #42112.


git-svn-id: https://develop.svn.wordpress.org/trunk@41812 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:56:46 +00:00
Konstantin Obenland b02beaf298 Menus: Limit mapping to registered locations
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
2017-10-10 17:07:31 +00:00
Konstantin Obenland 828dff99e9 Customizer: Account for legacy menu data
Checks for menu location data from when a previewed theme was previously active.

See #39692.


git-svn-id: https://develop.svn.wordpress.org/trunk@41810 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:05:01 +00:00
Boone Gorges 911c380a83 Taxonomy: Don't discard keys when merging queried terms from different taxonomies.
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
2017-10-10 16:45:01 +00:00
Mel Choyce 0bf42bf3b7 Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.


git-svn-id: https://develop.svn.wordpress.org/trunk@41808 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 16:22:34 +00:00
Weston Ruter f2f3a883d7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41807 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 07:08:51 +00:00
Gary Pendergast 33a0ff50b7 File Editor: Add support for more than one sub-directory level.
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
2017-10-10 05:33:57 +00:00
Weston Ruter 5deddd9c62 File Editor: Increase robustness of fatal error checking when saving PHP file edits.
* 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
2017-10-10 05:26:53 +00:00
Weston Ruter 55f2dac880 Customize: Ensure `customized` changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.


git-svn-id: https://develop.svn.wordpress.org/trunk@41804 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 04:50:37 +00:00
Weston Ruter 52ef606823 Customize: Constrain focus when overlay notification is displayed.
* 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
2017-10-10 03:33:57 +00:00
Weston Ruter a4dab604fb Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.


git-svn-id: https://develop.svn.wordpress.org/trunk@41802 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 23:00:39 +00:00
Konstantin Obenland 2ab27649f6 Menus: Add `social` as tertiary mapping group
Allows mapping of all social menus that include the term `social` in their slug.

See #39692.


git-svn-id: https://develop.svn.wordpress.org/trunk@41801 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 21:22:57 +00:00