Commit Graph

24788 Commits

Author SHA1 Message Date
Weston Ruter
5bde734323 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:45:51 +00:00
Weston Ruter
c1ede53374 Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 21:04:49 +00:00
Weston Ruter
5123283cf7 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:53:49 +00:00
Weston Ruter
6c05b7bef2 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:39:47 +00:00
Weston Ruter
7cb66a5353 Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 18:07:51 +00:00
Weston Ruter
b36fa8ce9c Customize: Adjust "Menu Locations" labels for singular/plural.
Props felipeelia.
Fixes #42112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:57:48 +00:00
Konstantin Obenland
b17b035009 Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.

Fixes #42121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:08:48 +00:00
Konstantin Obenland
a22bb4f3ad Customizer: Account for legacy menu data
Checks for menu location data from when a previewed theme was previously active.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:06:47 +00:00
Boone Gorges
8d773262f3 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.
Built from https://develop.svn.wordpress.org/trunk@41809


git-svn-id: http://core.svn.wordpress.org/trunk@41643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:45:48 +00:00
Mel Choyce
8f4e2bdb6b Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:23:50 +00:00
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
Gary Pendergast
58db3cb54e 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:34:49 +00:00
Weston Ruter
1a22fb3b60 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:27:49 +00:00
Weston Ruter
132c847087 Customize: Ensure customized changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 04:51:47 +00:00
Weston Ruter
ef1c95ff91 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 03:34:53 +00:00
Weston Ruter
f462387431 Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 23:01:46 +00:00
Konstantin Obenland
756c052ccb Menus: Add social as tertiary mapping group
Allows mapping of all social menus that include the term `social` in their slug.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 21:23:47 +00:00
Adam Silverstein
ca30822541 Docs: add docs for meta authorization filters.
Add filter documentation for `auth_{$object_type}_meta_{$meta_key}` and `auth_{$object_type}_{$sub_type}_meta_{$meta_key}`.

Props ericlewis, johneckman, DrewAPicture.
Fixes #36319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 19:14:52 +00:00
Weston Ruter
598e5f400e Customize: Add jsdoc for api.panel, api.section, api.control, and api.notifications collections.
Props shramee, westonruter.
Fixes #39930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 18:56:55 +00:00
Konstantin Obenland
8911893672 Widgets: Update globals documentation.
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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:35:47 +00:00
Weston Ruter
35b5c9e762 Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in top window.
* 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:04:48 +00:00
John Blackbourn
c9e8431582 Users: Remove some links to the dashboard from My Sites for users who cannot access it.
See #41453

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


git-svn-id: http://core.svn.wordpress.org/trunk@41630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 15:22:46 +00:00
John Blackbourn
b25e759621 Networks and Sites: Correct the documentation for the update_site_cache parameter of WP_Site_Query.
Props welcher, sudar
Fixes #42155

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


git-svn-id: http://core.svn.wordpress.org/trunk@41629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:26:49 +00:00
John Blackbourn
f14b24792a Press This: Use "installation" when referring to the act of installing Press This.
Props Presskopp
Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:08:48 +00:00
John Blackbourn
8ec310d44c Customize: Don't use an abbreviation in screen reader help text.
Props pixolin
Fixes 42153

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


git-svn-id: http://core.svn.wordpress.org/trunk@41627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 13:49:52 +00:00
Dominik Schilling
3dfe22a425 Customize: Add context to "View All Locations" string.
This is about navigation menu locations. Also updates the array alignment to use spaces.

See #40104.
Built from https://develop.svn.wordpress.org/trunk@41792


git-svn-id: http://core.svn.wordpress.org/trunk@41626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:34:49 +00:00
Dominik Schilling
3bee2912ea Customize: Use a consistent translator comment for the same strings.
See #21492.
Built from https://develop.svn.wordpress.org/trunk@41791


git-svn-id: http://core.svn.wordpress.org/trunk@41625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:23:46 +00:00
Pascal Birchler
d323ea9e18 Customize: Add missing word in error message about already published changesets.
Introduced in [41626].

Fixes #42144.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:25:55 +00:00
Pascal Birchler
1478135c46 Database: Use numbered placeholders in error message in wpdb::prepare().
Props tobifjellner.
Fixes #42142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:18:57 +00:00
Weston Ruter
a01ae9a8c3 Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 06:00:54 +00:00
Sergey Biryukov
dc4241986b General: Correct _deprecated_function() calls in debug_fopen(), debug_fwrite(), and debug_fclose().
The second parameter is supposed to be the version number, the replacement function should be the third parameter.

Props milindmore22, jdgrimes.
Fixes #41094.
Built from https://develop.svn.wordpress.org/trunk@41787


git-svn-id: http://core.svn.wordpress.org/trunk@41621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 00:40:52 +00:00
Sergey Biryukov
2ae2b1269a Rewrite: In url_to_postid(), bail early if the URL does not belong to the site.
Props ivankristianto, swissspidy, jkhongusc, SergeyBiryukov.
Fixes #39373.
Built from https://develop.svn.wordpress.org/trunk@41786


git-svn-id: http://core.svn.wordpress.org/trunk@41620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 23:29:51 +00:00
Sergey Biryukov
6ecdbe6e0e Editor: Fix JSHint errors after [41783].
See #42059.
Built from https://develop.svn.wordpress.org/trunk@41785


git-svn-id: http://core.svn.wordpress.org/trunk@41619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 19:12:49 +00:00
Sergey Biryukov
20a3f8d6c9 Build/Test Tools: In Tests_Image_Functions::test_load_directory(), check the expected internal type instead of using assertNotInternalType(), which causes an error with PHPUnit 6.4.0.
Props joemcgill.
Fixes #42124.
Built from https://develop.svn.wordpress.org/trunk@41784


git-svn-id: http://core.svn.wordpress.org/trunk@41618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 18:22:48 +00:00
Andrew Ozz
765272e3e5 Editor:
- 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.
Built from https://develop.svn.wordpress.org/trunk@41783


git-svn-id: http://core.svn.wordpress.org/trunk@41617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:44:48 +00:00
Sergey Biryukov
806c464e4b Login and Registration: Prevent PHP warnings when POSTing to wp-login.php with an array as a user_login or user_email field.
Props menakas, johnjamesjacoby.
Fixes #40888.
Built from https://develop.svn.wordpress.org/trunk@41782


git-svn-id: http://core.svn.wordpress.org/trunk@41616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:37:47 +00:00
Joe McGill
53a58e35b7 Media: Fix MEJS error when removing a media player.
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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 16:31:54 +00:00
Sergey Biryukov
0b39f4c99d Twenty Seventeen: Add missing @return tag for twentyseventeen_video_controls().
Props ndoublehwp, audrasjb.
Fixes #41927.
Built from https://develop.svn.wordpress.org/trunk@41780


git-svn-id: http://core.svn.wordpress.org/trunk@41614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 01:35:47 +00:00
Weston Ruter
77a4574b96 Widgets: Apply the same container-constraining embed resizing logic from the Video widget to embeds in the Text widget.
See #40854, #39994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 00:39:52 +00:00
Weston Ruter
b6297d1866 Customize: Prevent color default control type from overriding template for ColorControl.
Amends [41771].
See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 14:36:57 +00:00
Weston Ruter
766db88eb9 Post WordPress 4.9 Beta 1 version bump
Built from https://develop.svn.wordpress.org/trunk@41777


git-svn-id: http://core.svn.wordpress.org/trunk@41611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:54:52 +00:00
Weston Ruter
6a899cf45c WordPress 4.9 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@41776


git-svn-id: http://core.svn.wordpress.org/trunk@41610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:06:47 +00:00
Weston Ruter
b5f75fc315 File Editors: Fix JSHint error after [41774].
See #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:43:47 +00:00
Helen Hou-Sandí
b698881469 File Editors: Introduce an interstitial warning upon first visit.
This is an effort to provide a speed bump before heading into something potentially destructive and some education for users on better alternatives, even as we make the file editors safer to use. Each user, including existing users, will be shown a one-time dismissible modal warning on their first visit to each of the theme and plugin file editors.

Copy tweaks to come.

props michelleweber, Ipstenu, melchoyce, adamsilverstein, westonruter, toddnestor, aryamaaru, ZaneMatthew, cliffseal, helen.
fixes #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:25:48 +00:00
Weston Ruter
7f7dffafbb Customize: Fix QUnit tests after failures introduced in [41768].
Props bpayton.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:23:48 +00:00
Weston Ruter
48209c926f Widgets: Remove "Replace Gallery" button from Gallery widget since redundant with "Edit Gallery".
Props Presskopp, juhise, melchoyce.
See #41914.
Fixes #41994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 03:13:49 +00:00
Weston Ruter
9d6134a88c Customize: Add default control template for standard input types.
Re-use default template instead of introducing custom one for the Discard Changes button.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:56:47 +00:00
Sergey Biryukov
561bde29c7 Administration: Add .protected-post-excerpt class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.
Built from https://develop.svn.wordpress.org/trunk@41770


git-svn-id: http://core.svn.wordpress.org/trunk@41604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:50:46 +00:00
Sergey Biryukov
2e8615f21e REST API: After [41760], use correct query variable in WP_Term_Query::parse_orderby() when 'include_slugs' => 'slug__in' is passed.
See #40826.
Built from https://develop.svn.wordpress.org/trunk@41769


git-svn-id: http://core.svn.wordpress.org/trunk@41603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:28:47 +00:00
Weston Ruter
275f4713a5 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:22:49 +00:00
Sergey Biryukov
a47a253e90 Taxonomy: After [40903], restore documentation for wp_dropdown_categories() arguments that are different from the defaults in WP_Term_Query::__construct().
Fixes #41058.
Built from https://develop.svn.wordpress.org/trunk@41767


git-svn-id: http://core.svn.wordpress.org/trunk@41601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:57:48 +00:00
Sergey Biryukov
2f0f46cb84 Menus: Introduce wp_get_nav_menu_name() to retrieve the name of a navigation menu as set in the admin.
Props markoheijnen, christophherr, SpencerFinnell, wojtek.szkutnik, sagarprajapati, welcher, SergeyBiryukov.
Fixes #13910.
Built from https://develop.svn.wordpress.org/trunk@41766


git-svn-id: http://core.svn.wordpress.org/trunk@41600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:38:46 +00:00
Konstantin Obenland
2bd80ac24f Widgets: Continue to use shortcode for some embeds
Renders YouTube and Vimeo embeds through WordPress' video shortcode.

See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:29:46 +00:00
K. Adam White
2914ba6db8 Widgets: Fix jshint error in media widget.
Built from https://develop.svn.wordpress.org/trunk@41764


git-svn-id: http://core.svn.wordpress.org/trunk@41598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:58:48 +00:00
Sergey Biryukov
33beafaf02 Posts, Post Types: Introduce page_attributes_misc_attributes action that fires before the help hint text in the 'Page Attributes' meta box.
Props markcallen, MikeHansenMe.
Fixes #34034.
Built from https://develop.svn.wordpress.org/trunk@41763


git-svn-id: http://core.svn.wordpress.org/trunk@41597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:55:47 +00:00
Sergey Biryukov
2c5a378291 Twenty Fourteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.
Built from https://develop.svn.wordpress.org/trunk@41762


git-svn-id: http://core.svn.wordpress.org/trunk@41596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:42:46 +00:00
Sergey Biryukov
0a2c1d7749 Twenty Fifteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.
Built from https://develop.svn.wordpress.org/trunk@41761


git-svn-id: http://core.svn.wordpress.org/trunk@41595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:41:46 +00:00
K. Adam White
30827e4a4f REST API: Support ordering response collection by listed slugs.
Adds an "include_slug" orderby value for REST API collections to permit returning a collection filtered by slugs in the same order in which those slugs are specified.
Previously, the order of slugs provided with the ?slug query parameter had no effect on the order of the returned records.

Props wonderboymusic, ocean90, boonebgorges.
Fixes #40826.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:37:47 +00:00
Konstantin Obenland
5fe4acb1f5 Widgets: Allow oEmbeds in video widget.
Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:22:47 +00:00
K. Adam White
704fb3900b REST API: Support objects in settings schema.
Enables register_setting to accept an object as its schema value, allowing settings to accept non-scalar values through the REST API.
This whitelists the added type in the settings controller, and passes properties from argument registration into the validation functions.

Props joehoyle.
See #38583.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:19:49 +00:00
Sergey Biryukov
9319a9cec9 Bundled Themes: Restore double line breaks before media queries.
See #40138.
Built from https://develop.svn.wordpress.org/trunk@41757


git-svn-id: http://core.svn.wordpress.org/trunk@41591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:02:48 +00:00
Sergey Biryukov
203b275658 Bundled Themes: Change tag cloud format to a list (<ul>) for better semantics and accessibility.
List markup allows screen reader users to know in advance how many tags are within the list.

Props xkon, davidakennedy.
Fixes #40138.
Built from https://develop.svn.wordpress.org/trunk@41756


git-svn-id: http://core.svn.wordpress.org/trunk@41590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:53:47 +00:00
Gary Pendergast
37aa531cd4 Plugins: Tweak the plugin icons added in [41695].
- Remove plugins icons from the plugin list table, as there were performance issues loading the icons when the site had lots of plugins.
- Depending on which icons the plugin has uploaded, prefer them in this order: `svg`, `128x128`, `256x256`.
- Improve the style of the fallback icon for plugins that don't have an icon defined.

Props Travel_girl, danieltj, afercia, karmatosed,hugobaeta, empireoflight, brentjett, melchoyce, pento.
Fixes #30186.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:43:46 +00:00
Sergey Biryukov
821004b1a6 Twenty Seventeen: After [41703], adjust RTL styles for tag cloud widget.
Props davidakennedy.
Fixes #40184.
Built from https://develop.svn.wordpress.org/trunk@41754


git-svn-id: http://core.svn.wordpress.org/trunk@41588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:35:50 +00:00
John Blackbourn
50948669eb Users: Revert [41613], [41614], and [41623] as this feature needs some more work.
See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 22:17:46 +00:00
Adam Silverstein
adb8f0161b Build: Webpack instead of Browserify as JavaScript bundler.
Use Webpack as our bundler of choice, enabling improved JavaScript build chain capabilities.

Props aduth, netweb, kadamwhite, schlessera.
Fixes #40894. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@41586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 21:02:23 +00:00
Adam Silverstein
0a431ea356 Revert "Add wp.hooks - JavaScript actions and filters."
Revert `wp.hooks` for now as we continue to refine and test. 

Reverts [41375].

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


git-svn-id: http://core.svn.wordpress.org/trunk@41585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:25:49 +00:00
Weston Ruter
f5bc1d1f52 Customize: Allow controls to be created with pre-instantiated Setting object(s), or even with plain Value object(s).
* Allow passing settings in keyed object (e.g. `settings: { default: 'id' }  ), or as an array (e.g. `settings: [ 'id' ]`) with first being default; again, `Setting`/`Value` objects may be supplied instead of IDs.
* Allow a single setting to be supplied with just a single `setting` param, either a string or a `Setting`/`Value` object.
* Update `changeset_status` and `scheduled_changeset_date` to be added dynamically with JS and simply passing of `api.state()` instances as `setting`.
* Introduce a `data-customize-setting-key-link` attribute which, unlike `data-customize-setting-link`, allows passing the setting key (e.g. `default`) as opposed to the setting ID.
* Allow `WP_Customize_Control::get_link()` to return `data-customize-setting-key-link` when setting is not registered.
* Eliminate `default_value` from `WP_Customize_Date_Time_Control` since now comes from supplied `Value`.
* Export status choices as `wp.customize.settings.changeset.statusChoices`.
* Export date and time formats as `wp.customize.settings.dateFormat` and `wp.customize.settings.timeFormat` respectively.

Props westonruter, sayedwp.
See #39896, #30738, #30741, #42083.
Fixes #37964, #36167.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:02:49 +00:00
Sergey Biryukov
08b5714221 Customize: Improve the wording for Site Icon control intro.
Props michelleweber, dlh, menakas, melchoyce.
Fixes #40430.
Built from https://develop.svn.wordpress.org/trunk@41749


git-svn-id: http://core.svn.wordpress.org/trunk@41583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:59:48 +00:00
John Blackbourn
be693a6181 Build/Test tools: Remove PHP 7.2 from the allowed failures list on Travis CI.
Fixes #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:54:48 +00:00
Sergey Biryukov
dd4ea3c038 Customize: Improve the wording for Header Image control intro.
Props michelleweber, menakas, jcc9873, melchoyce.
Fixes #40431.
Built from https://develop.svn.wordpress.org/trunk@41747


git-svn-id: http://core.svn.wordpress.org/trunk@41581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:35:47 +00:00
Mike Schroder
e8a1a7ab2b Media: Store video creation date in meta.
When able to be parsed, store the created date for a video file from meta,
since this is useful separately from the dates on the file itself.

Introduces `wp_get_media_creation_timestamp()` to read the timestamp from
getID3 and a `wp_read_video_metadata` filter analogous to
`wp_read_image_metadata`.

Fixes #35218.
Props stevegrunwell, joemcgill, desrosj, blobfolio, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@41746


git-svn-id: http://core.svn.wordpress.org/trunk@41580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:32:47 +00:00
Adam Silverstein
eb3b3fec1d Security: Rename new wp.sanitize.sanitizeText to stripTagsAndEncodeText.'
Improve function naming: this function strips tags from a string and also encodes any HTML entities.

Props ocean90.

Fixes #40635.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:58:47 +00:00
K. Adam White
37ec288f71 REST API: Add _fields parameter to selectively include fields in response JSON.
Allows REST API consumers to specify the specific fields needed in their application code, whitelisting those fields and omitting all others from the returned JSON response object.
This permits applications that only need for example the ID and title of posts to avoid having to transfer the entire rendered post content over the wire alongside the desired fields.
While this whitelisting has no affect on the queries run when preparing the response, it can yield significant reductions in the bandwidth required to transfer a response payload for simple applications.

Props adamsilverstein, TimothyBlynJacobs, svrooij.
Fixes #38131.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:46:38 +00:00
Jeremy Felt
018a94d5f5 Multisite: Use get_site_by() in get_id_from_blogname().
Fixes #42091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:45:52 +00:00
Sergey Biryukov
0f0ab0e8ef Media: Improve the preview of transparent images in Edit Image modal by using CSS3 to show a checkered background.
Props powerzilly, stevepuddick.
Fixes #41966. See #41948.
Built from https://develop.svn.wordpress.org/trunk@41742


git-svn-id: http://core.svn.wordpress.org/trunk@41576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:35:46 +00:00
John Blackbourn
fbd44ee554 Security: Add a referrer policy header to the admin and login screens.
This sets a referrer policy of `same-origin` which adds hardening by preventing a referrer being sent from the admin area or login screens to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within URLs.

This change introduces a new filter, `admin_referrer_policy`, for filtering the referrer policy header value. The header can be disabled if necessary by removing the `wp_admin_headers` action from the `admin_init` and `login_init` hooks.

Props joostdevalk
Fixes #42036

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


git-svn-id: http://core.svn.wordpress.org/trunk@41575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:25:46 +00:00
Weston Ruter
c03b283f37 Customize: Improve accessibility of markup for base WP_Customize_Control and WP_Customize_Nav_Menu_Control with proper use of label elements and inclusion of aria-describedby.
See #33085.
Props valendesigns, afercia, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:12:46 +00:00
Weston Ruter
55ba2f5e53 Customize: Fix theme details modal by updating logic in getPreviousTheme and getNextTheme to not rely on DOM traversal and manually constructing control IDs.
Amends [41726].
See #42083, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 16:49:46 +00:00
Jeremy Felt
f646f0aa47 Multisite: Only query for one site in domain_exists().
`get_sites()` queries for a maximum of 100 records by default. In `domain_exists()`, we only use one.

A previous commit, [41736], has this same commit message but applies to `get_blog_id_from_url()` and #42073 instead.

Props danieltj, spacedmonkey.
Fixes #42072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 16:26:45 +00:00
K. Adam White
fe29c9c881 REST API: Return 409 status when attempting to create an existing term.
Fixes an issue where submitting a well-formed request to create a term inappropriately returns a 500 error status if that term already exists.
HTTP 5xx error codes should be reserved for unexpected server errors, so "409 Conflict" is a more appropriate response.

Props alibasheer, guzzilar, shooper.
Fixes #41370.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 16:24:46 +00:00
Jeremy Felt
19e9de3367 Multisite: Only query for one site in domain_exists().
`get_sites()` queries for a maximum of 100 records by default. In `domain_exists()`, we only use one.

Props danieltj, spacedmonkey.
Fixes #42072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 16:11:51 +00:00
John Blackbourn
090dfae53e REST API: Avoid counting an uncountable type when checking read permissions for comment posts.
This avoids deprecated notices from showing in PHP 7.2 and above.

Props ayeshrajans
Fixes #41457

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


git-svn-id: http://core.svn.wordpress.org/trunk@41569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 15:38:49 +00:00
Sergey Biryukov
54ff178923 I18N: Make sure wp_dropdown_languages() does not print out empty name and id attributes.
Props johnjamesjacoby, afercia.
Fixes #40829.
Built from https://develop.svn.wordpress.org/trunk@41734


git-svn-id: http://core.svn.wordpress.org/trunk@41568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 15:23:46 +00:00
Sergey Biryukov
35617e12dd I18N: In wp_dropdown_languages(), change the parsed arguments variable to $parsed_args, to prevent stomping the original $args array.
Props Mte90.
See #40829.
Built from https://develop.svn.wordpress.org/trunk@41733


git-svn-id: http://core.svn.wordpress.org/trunk@41567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 15:08:46 +00:00
Joe McGill
7e29c9646a Customizer: Minimize duplicate header crops in the media library.
This adds `Custom_Image_Header::get_previous_crop()`, which finds any
previously cropped headers created from the same base image and replaces
that attachment rather than creating a new attachment.

After updating a crop, the replaced images is also removed from the list
of previous header images in the Customizer.

See #21819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 14:59:48 +00:00
K. Adam White
18d9cc6051 REST API: Specify specific json-schema version.
Explicitly specifies that the REST API uses JSON Schema draft-04,
as JSON Schema has deprecated versionless schema URIs and recommends
the use of a specific draft version.

Props @TimothyBlynJacobs
Fixes #41734


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


git-svn-id: http://core.svn.wordpress.org/trunk@41565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 14:52:46 +00:00
John Blackbourn
20f2edbb4e I18N: Improvements to the tests for plural forms.
* Move the `create_function()` code into a file that's only loaded, and into a test that's only run, on PHP <= 7.2 to avoid deprecated warnings in 7.2+.
* Convert the test skipping into a failure if the GlotPress locale file cannot be downloaded.
* Ensure `test_exceptions` fails if an exception is not thrown.
* Docs improvements

See #41562, #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 13:27:47 +00:00
Sergey Biryukov
44e23c2dab Twenty Sixteen: Make sure comment number comparison in comments.php works as expected.
`get_comments_number()` returns a numeric string, not an integer.

See #39660.
Built from https://develop.svn.wordpress.org/trunk@41729


git-svn-id: http://core.svn.wordpress.org/trunk@41563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 13:22:48 +00:00
Sergey Biryukov
e29c2f560b Template: Introduce readonly() form helper to complement the disabled() helper added in [13658].
Props soulseekah.
Fixes #16886.
Built from https://develop.svn.wordpress.org/trunk@41728


git-svn-id: http://core.svn.wordpress.org/trunk@41562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 13:19:48 +00:00
Joe Hoyle
f276b4901b REST API: Support for objects in schema validation and sanitization.
When registering routes developers can now define their complex objects in the schema and benefit from the automatic validation and sanitization in the REST API. This also paves the way for support for complex object registration via register_meta and register_setting.

See #38583.
Props TimothyBlynJacobs5.
Built from https://develop.svn.wordpress.org/trunk@41727


git-svn-id: http://core.svn.wordpress.org/trunk@41561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 08:27:47 +00:00
Weston Ruter
f8c6040ff5 Customize: Improve usability of Customize JS API.
* Eliminate need to pass both ID and instance in calls to `Values#add()` for panels, sections, controls, settings, partials, and notifications.
* Eliminate need to supply `content` param when constructing a `Control`.
* Unwrap the `options.params` object passed in constructors to just pass a flat `options`. (Back-compat is maintained.)
* Add support for `templateId` param for `Control` to override which template is used for the content.
* Remove unused `previewer` being supplied in `Control` instances.
* Rename `classes` to `containerClasses` on `Notification`.
* Automatically supply `instanceNumber` to improve stable sorting.
* Use `api.Notifications` for notifications in settings instead of `api.Value`.

See #30741.
Fixes #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 06:48:46 +00:00
Gary Pendergast
3987df19fe Tests: Some tests in [41722] were using newer PHPUnit features.
`test_cache` used PHPUnit's object mocking to test some internal behaviour in `Plural_Forms`, but made use of the `willReturn()` method, which was introduced in PHPUnit 4.0 as shorthand for `will($this->returnValue())`. Fixed by switching to the longer form.

Several tests used the `@expectedException` directive to catch generic `Exception` exceptions, which was added in PHPUnit 3.7. Fixed by changing to an explicit `try` / `catch` test.

See #41562.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 04:11:46 +00:00
Joe McGill
760f9fd3fd Media: Use max-width for default captions.
This alters the HTML output of the image caption shortcode to use
`max-width` instead of `width` to improve compatibility with
flexible layouts.

Props aaronrutley, desrosj.
Fixes #33981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 02:50:46 +00:00
Gary Pendergast
4f48c60803 I18N: Fix a PHP error introduced in [41722].
PHP 5.2 and 5.3 don't support short array syntax, Ryan.

Fixes #41562.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 02:12:46 +00:00
Gary Pendergast
0a3b7d8e31 I18N: Introduce the Plural_Forms class.
Historically, we've evaluated the plural forms for each language using `create_function()`. This is being deprecated in PHP 7.2, so needs to be replaced.

The `Plural_Forms` class parses the `Plural-Forms` header from the PO file, and internally caches the result of all subsequent plural form tests, allowing it to match the performance of the existing code.

Props rmccue.
Fixes #41562.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 01:30:46 +00:00
Weston Ruter
5f7a5c1246 File Editors: Introduce sandboxed live editing of PHP files with rollbacks for both themes and plugins.
* Edits to active plugins which cause PHP fatal errors will no longer auto-deactivate the plugin. Supersedes #39766.
* Introduce sandboxed PHP file edits for active themes, preventing accidental whitescreening of a user's site when introducing a fatal error.
* After writing a change to a PHP file for an active theme or plugin, perform loopback requests on the file editor admin screens and the homepage to check for fatal errors. If a fatal error is encountered, roll back the edited file and display the error to the user to fix and try again.
* Introduce a secure way to scrape PHP fatal errors from a site via `wp_start_scraping_edited_file_errors()` and `wp_finalize_scraping_edited_file_errors()`.
* Moves file modifications from `theme-editor.php` and `plugin-editor.php` to common `wp_edit_theme_plugin_file()` function.
* Refactor themes and plugin editors to submit file changes via Ajax instead of doing full page refreshes when JS is available.
* Use `get` method for theme/plugin dropdowns.
* Improve styling of plugin editors, including width of plugin/theme dropdowns.
* Improve notices API for theme/plugin editor JS component.
* Strip common base directory from plugin file list. See #24048.
* Factor out functions to list editable file types in `wp_get_theme_file_editable_extensions()` and `wp_get_plugin_file_editable_extensions()`.
* Scroll to line in editor that has linting error when attempting to save. See #41886.
* Add checkbox to dismiss lint errors to proceed with saving. See #41887.
* Only style the Update File button as disabled instead of actually disabling it for accessibility reasons.
* Ensure that value from CodeMirror is used instead of `textarea` when CodeMirror is present.
* Add "Are you sure?" check when leaving editor when there are unsaved changes.

Supersedes [41560].
See #39766, #24048, #41886.
Props westonruter, Clorith, melchoyce, johnbillion, jjj, jdgrimes, azaozz.
Fixes #21622, #41887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 00:20:45 +00:00
Weston Ruter
0909a73eed Customize: Let establish_loaded_changeset query changesets from any author not just current user when determining which changeset to autoload in non-branching mode.
See #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 00:01:46 +00:00
Felix Arntz
29e5ad5528 Multisite: Improve get_blog_details() by using get_site_by().
`get_site_by()` is now the preferred way to retrieve a site object by lookup for identifying data. By using a coherent structure and `get_sites()` internally, it has several advantages over the direct database queries and complex code in `get_blog_details()`. Therefore `get_blog_details()` is now a wrapper for `get_site_by()`, providing backward compatibility fixes where necessary.

Unit tests have been adjusted to account for the `blog-details` and `blog-lookup` cache groups, which are no longer needed.

Props spacedmonkey, jeremyfelt, flixos90.
Fixes #40228.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 19:40:46 +00:00
Felix Arntz
f821106df8 Multisite: Use WP_Network_Query in ms_load_current_site_and_network().
This gets rid of the last readonly direct database query for networks in core. 🎉

Props spacedmonkey.
Fixes #41762.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 19:26:49 +00:00
Felix Arntz
1130241bbd Multisite: Replace calls to refresh_blog_details() with clean_blog_cache().
Fixes #42077. See #40201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 19:05:46 +00:00
Felix Arntz
a9b8f70682 Multisite: Establish clean_blog_cache() as a replacement for refresh_blog_details().
Going forward, `clean_blog_cache()` is recommended to be used instead of `refresh_blog_details()`. It has been adjusted to match the functionality of the latter, with the exception that it always requires a site ID or object to be passed. The `refresh_blog_details` action has been deprecated in favor of the `clean_site_cache` action. The function itself is not formally deprecated at this point, but will likely be in the near future.

Props spacedmonkey.
Fixes #40201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 18:41:48 +00:00
Felix Arntz
0410474758 Multisite: Add specific tests for clean_blog_cache() and refresh_blog_details().
See #40201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 18:21:46 +00:00
John Blackbourn
2ad86e1e82 Docs: Correct some @since MU notation that was broken in [41200].
Every function introduced by MU was introduced in 3.0.0 as this was when MU was merged.

See #41509

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


git-svn-id: http://core.svn.wordpress.org/trunk@41548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 17:44:48 +00:00
John Blackbourn
f4f31bc598 Plugins: Introduce a singular and plural form for the plugin deletion error message.
Props eddhurst, SergeyBiryukov

Fixes #38918

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


git-svn-id: http://core.svn.wordpress.org/trunk@41547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 17:13:46 +00:00
John Blackbourn
1e1a48aaa0 Embeds: Remove the external oEmbed tests for YouTube.
These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

See #42076, #32714, #23149

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


git-svn-id: http://core.svn.wordpress.org/trunk@41546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 16:52:46 +00:00
Andrea Fercia
d8ea080526 Accessibility: Change all the #f00 and red to the official WordPress accent red.
WordPress should exclusively use colors from the official colors palette, see
https://make.wordpress.org/design/handbook/design-guide/foundations/colors/
Partially addresses accessibility color contrast ratio issues.

See #35622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 16:03:32 +00:00
John Blackbourn
22fd6a190b Login and Registration: Add unit tests for wp_auth_check().
Props pbearne, birgire

Fixes #41860

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


git-svn-id: http://core.svn.wordpress.org/trunk@41544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 16:02:46 +00:00
Andrea Fercia
a452e2259b Customize: Fix invalid HTML and aria-describedby values.
- fixes invalid HTML and duplicate IDs
- as per the Accessibility coding standards, all new code must use explicitly associated form labels
- properly escapes a few HTML attributes

Props celloexpressions, afercia.
Fixes #42054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 15:44:46 +00:00
Andrew Ozz
d0593d59be Tools: enable Grunt precommit task to run without requiring SVN or GIT.
Fixes #41957
Built from https://develop.svn.wordpress.org/trunk@41708


git-svn-id: http://core.svn.wordpress.org/trunk@41542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 15:20:46 +00:00
Sergey Biryukov
52ca3b18d2 HTTP API: Use WP_HTTP_Response::set_data() in ::__construct() instead of directly accessing the $data property.
Props tfrommen.
Fixes #41759.
Built from https://develop.svn.wordpress.org/trunk@41707


git-svn-id: http://core.svn.wordpress.org/trunk@41541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 15:18:46 +00:00
Sergey Biryukov
af4cda27cc Posts, Post Types: Simplify the wording in post locking notice.
Props munyagu.
Fixes #42023.
Built from https://develop.svn.wordpress.org/trunk@41706


git-svn-id: http://core.svn.wordpress.org/trunk@41540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 15:11:48 +00:00
Sergey Biryukov
190929cb6c Multisite: Change IP references in new site or user notifications to IP address for clarity.
Props gk.loveweb, bradparbs.
See #40382.
Built from https://develop.svn.wordpress.org/trunk@41705


git-svn-id: http://core.svn.wordpress.org/trunk@41539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 13:13:47 +00:00
Sergey Biryukov
806b2a5af1 Comments: Change IP references in moderation option labels and email notifications to IP address for clarity.
Props mako09, gk.loveweb, bradparbs.
Fixes #40382.
Built from https://develop.svn.wordpress.org/trunk@41704


git-svn-id: http://core.svn.wordpress.org/trunk@41538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 13:09:47 +00:00
Sergey Biryukov
f67678b59a Twenty Seventeen: Change tag cloud format to a list (<ul>) for better semantics and accessibility.
List markup allows screen reader users to know in advance how many tags are within the list.

Props sami.keijonen.
Fixes #40184.
Built from https://develop.svn.wordpress.org/trunk@41703


git-svn-id: http://core.svn.wordpress.org/trunk@41537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 12:17:46 +00:00
Gary Pendergast
369ad06c82 Emoji: Fix incorrect emoji encoding in PHP < 5.4.
[41701] included a bug with PHP < 5.4. Prior to then, `html_entity_decode()` decoded into `ISO-8859-1`, when we actually need it to use `UTF-8`.

Fixes #35293.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 09:57:47 +00:00
Gary Pendergast
a7a57df525 Emoji: Bring Twemoji compatibility to PHP.
This was previously attempted in [41043], which unfortunately had severe performance issues, the regex it used was fatally slow on long posts.

This version now uses an array of all emoji that Twemoji supports, which maintains the accuracy of [41043], while being the same speed or only a few ms slower than the code prior to [41043].

As with [41043], the `grunt precommit:emoji` task detects when `twemoji.js` has changed, and regenerates the array.

Props jmdodd for feedback, suggestions, and insults where appropriate.
Fixes #35293. 🤞🏻


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


git-svn-id: http://core.svn.wordpress.org/trunk@41535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 07:12:50 +00:00
Jeremy Felt
7e190e496b Multisite: Use %s when building query for archived sites in WP_Site_Query.
In [25548], the `archived` column in `wp_blogs` was changed from `ENUM` to `TINYINT` to match other status fields. When `WP_Site_Query` was written later, it used `%d` as a placeholder when formatting the archived status.

It is possible that this query will fail for any installations that did not update the schema for `wp_blogs` as only single quoted values are accepted for the `ENUM` type. In this case, `'0'` or `'1'` rather than `0` or `1`.

We can work around this and support both `ENUM` and `TINYINT` in the query by using the `%s` placeholder and casting the value with `absint()`.

Props stephdau.
Fixes #38856. See #27832.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 04:40:46 +00:00
Weston Ruter
a3ad1e8c57 Customize: Update dashboard welcome link to point to themes panel in the customizer instead of themes admin screen.
Props celloexpressions.
Fixes #42050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 04:13:46 +00:00
Jeremy Felt
a580793b82 Multisite: Introduce get_site_by().
`get_site_by()` is a replacement for `get_blog_details()` that uses `WP_Site_Query` to retrieve specific sites based on a given field and value.

Props flixos90, spacedmonkey.
Fixes #40180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 04:10:49 +00:00
Weston Ruter
2d69c9ef4f Customize: Provide validation feedback for invalid Custom Link URLs in nav menu items.
Props RMarks, EGregor, umangvaghela123, andrew.taylor, celloexpressions, westonruter, voldemortensen.
Fixes #32816.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 03:43:47 +00:00
Joe McGill
51ee4233f1 Widgets: Default to "custom URL" in the image widget.
This changes the default value for `link_type` in the image widget
schema to 'custom'.

Props bor0, desrosj.
Fixes #41629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 03:00:48 +00:00
Gary Pendergast
7e33702830 Plugins: Add plugin icons to the plugin list tables.
To mirror theme list table behaviour, the plugin icon now appears next to plugins in the plugin list tables. For plugins that don't have an icon, or non-W.org plugins, a fallback dashicon is shown.

Props melchoyce, afercia, paulwilde, pento, obenland.
Fixes #30186.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 00:25:46 +00:00
Weston Ruter
8d79246606 Customize: Add button in Publish Settings to discard unsaved changes (including drafted and scheduled), reverting Customizer to the last published state.
Props westonruter, melchoyce.
Amends [41667].
See #39896, #21666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 00:22:49 +00:00
John Blackbourn
882a2a8042 Build/Test tools: Correctly delete attachment files used in the media and post thumbnail tests.
Props atanasangelovdev

Fixes #38264 

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


git-svn-id: http://core.svn.wordpress.org/trunk@41527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 00:09:46 +00:00
John Blackbourn
f9a5f5485d I18N: Allow the login screen language to be specified via a wp_lang query variable, and use this for the interim login modal.
This allows users who are using the admin area in a language other than the site language to read the notice on the login screen
(which explains that they need to log in again) in their chosen language.

Props Nikschavan, swissspidy

Fixes #40205

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


git-svn-id: http://core.svn.wordpress.org/trunk@41526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 23:21:47 +00:00
Sergey Biryukov
50e03e19af Login and Registration: Introduce login_title filter for the <title> tag content on login page.
The new filter mirrors the `admin_title` filter used on admin pages.

Props nishitlangaliya, henry.wright, SergeyBiryukov.
Fixes #40812.
Built from https://develop.svn.wordpress.org/trunk@41691


git-svn-id: http://core.svn.wordpress.org/trunk@41525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 23:00:46 +00:00
Sergey Biryukov
63402326c1 Login and Registration: Make the order of <title> tag parts on login page consistent with the rest of admin pages.
Props nishitlangaliya, henry.wright.
Fixes #40814.
Built from https://develop.svn.wordpress.org/trunk@41690


git-svn-id: http://core.svn.wordpress.org/trunk@41524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:30:46 +00:00
Sergey Biryukov
df0958697a Comments: Pass $comment object to comment actions:
* `delete_comment`
* `deleted_comment`
* `trash_comment`
* `trashed_comment`
* `untrash_comment`
* `untrashed_comment`
* `spam_comment`
* `spammed_comment`
* `unspam_comment`
* `unspammed_comment`

Props henry.wright.
Fixes #41228.
Built from https://develop.svn.wordpress.org/trunk@41689


git-svn-id: http://core.svn.wordpress.org/trunk@41523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:15:33 +00:00
John Blackbourn
4a16295dc5 Docs: Standardise the format used for documenting parameters passed by reference.
See #35974, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:14:46 +00:00
Sergey Biryukov
c5c5fb1cd3 Twenty Seventeen: Add missing labels for <aside role="complementary"> widget areas.
Props sami.keijonen.
Fixes #42056.
Built from https://develop.svn.wordpress.org/trunk@41687


git-svn-id: http://core.svn.wordpress.org/trunk@41521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:04:46 +00:00
John Blackbourn
9fdbe6538e Docs: Remove & prefixes from parameter documentation to avoid doc parsing errors.
Props sudar for the original patch.

See #35974

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


git-svn-id: http://core.svn.wordpress.org/trunk@41520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:03:33 +00:00
Sergey Biryukov
253541556e Widgets: Pass $instance to widget argument filters:
* `widget_archives_dropdown_args`
* `widget_archives_args`
* `widget_categories_dropdown_args`
* `widget_categories_args`
* `widget_meta_poweredby`
* `widget_pages_args`
* `widget_comments_args`
* `widget_posts_args`
* `widget_tag_cloud_args`

See [33971] for `widget_links_args` and [34662] for `widget_nav_menu_args`.

Props Takahashi_Fumiki.
Fixes #38017.
Built from https://develop.svn.wordpress.org/trunk@41685


git-svn-id: http://core.svn.wordpress.org/trunk@41519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:02:47 +00:00
Andrea Fercia
a42b9cebde Quick/Bulk Edit: Improve the inline error messages styling.
- uses the core `notice` styles for the Quick Edit form inline error messages
- adds missing periods at the end of a few error messages

Props ocean90, karmatosed, melchoyce, afercia.
Fixes #35496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 21:52:52 +00:00
Andrea Fercia
6a6795382a Accessibility: List Tables: use aria-current for the views current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:44:47 +00:00
Andrea Fercia
c56dbad284 Accessibility: Improve the Dashboard Nearby Events widget wp.a11y.speak() messages.
Avoids to announce the "city updated" message on page load.

Fixes #42037.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:25:45 +00:00
John Blackbourn
3dda9e9257 Embeds: Add oEmbed support for someecards.com.
Props someecards

Fixes #40792

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


git-svn-id: http://core.svn.wordpress.org/trunk@41515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:10:49 +00:00
John Blackbourn
7859e22ad5 Embeds: Switch the collegehumor.com oEmbed endpoint to HTTPS, as it redirects there by default now.
See #28507

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


git-svn-id: http://core.svn.wordpress.org/trunk@41514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:06:46 +00:00
Weston Ruter
d8d8a01134 Customize: Fix jumping behavior upon scrolling up when a sticky header has its description expanded.
Props delawski.
See #34343, #41879.
Fixes #41850.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:55:47 +00:00
Adam Silverstein
5087d26d2d WP-API JS Client: Improve support for meta.
* Add/fix `getMeta`, `getMetas`, `setMeta` and `setMetas` helpers for models that support meta.
* Add tests for new helpers, verify meta support for `Posts`, `Comments`, `Tags` and `Users`.
* Include meta data in fixture generation and fixture file driving tests.

Fixes #41055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:41:35 +00:00
Weston Ruter
df7af1ee21 Customize: Fix positioning of outer section (e.g. publish settings) on large screen sizes.
Also fix preview link CSS for desktop and mobile.

Props sayedwp, bduclos.
See #39896.
Fixes #42051.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:40:48 +00:00
John Blackbourn
2e3581c3ad Embeds: Alignment following [41615].
See #38181

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


git-svn-id: http://core.svn.wordpress.org/trunk@41510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:38:46 +00:00
Adam Silverstein
896d779541 Menus: Increase timeout for QUnit wpNavMenu trigger tests.
Fix an (intermittent) issue where the final assertion verifying all hooks have been triggered ran too early, resulting in the test failing. 

Fixes #31218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:35:46 +00:00
John Blackbourn
acaf286151 Taxonomy: Add context and a translator comment to the new most_used label.
Fixes #41150

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


git-svn-id: http://core.svn.wordpress.org/trunk@41508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:25:46 +00:00
Konstantin Obenland
1e6810e433 Widgets: Revert format of sidebars_widgets.
Restores the data format of the `sidebars_widgets` theme mod to its pre [41555]
format. It can trigger PHP warnings after switching themes if that mod has not
been removed previously.

Fixes #39693.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 18:11:46 +00:00
Weston Ruter
6db8e66b43 Customize: Improve styling of date/time Customizer control.
* Let date `legend` be screen reader text when time is not included.
* Skip rendering containers for label (title) and description when not supplied in registered control.
* Fix margins and padding.

Amends [41670].
Props westonruter, afercia, sayedwp.
Fixes #42022.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 17:34:47 +00:00
Weston Ruter
31647252e7 Plugin Editor: Remove plugins_loaded from being re-triggered in plugin_sandbox_scrape().
Props jdgrimes.
Amends [41560].
Fixes #39766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 17:07:49 +00:00
Weston Ruter
a83e4eb40e Customize: Fix WP_Customize_Date_Time_Control to be re-usable for plugins and custom settings.
* Allow time fields to be omitted by constructing with `timeIncluded` as `false`.
* Ensure `reportValidity` is only called on a control when it is in an expanded section.
* Rename "ampm" to "meridian".
* Improve accessibility and fix HTML validation and style issues for both the date/time control and the preview link control.
* Fix styling of dropdowns and clean CSS.
* Improve accessibility of nav menus component.

Props westonruter, afercia, sayedwp, melchoyce.
Amends [41626].
See #39896.
Fixes #42022.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 04:12:47 +00:00
Peter Wilson
8294b40161 Emoji: Refactor browser support tests.
Moves the repeated code in the emoji browser support test to a function to reduced the potential for errors and follow DRY principles.

Renames the "emoji4" test "emoji" as unicode version specific tests were removed in [38869].

Props peterwilsoncc, pento for code review.
Fixes #41156.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 04:00:48 +00:00
Jeremy Felt
5ccf8eebb7 Multisite: Deprecate is_user_option_local().
`is_user_option_local()` was added during MU development and used for a handful of changesets before the code using it was removed again. It has not been used by MU or core since nor is it widely used elsewhere.

Fixes #41697.
Props bnap00, jeremyfelt.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 03:38:45 +00:00
Weston Ruter
728e44ab5a Customize: Add infrastructure for trashing/reverting of unpublished changes; introduce full-screen OverlayNotification for trashing and theme install/preview.
* Introduce a new `wp.customize.previewer.trash()` JS API to trash the current changeset, along with logic to `WP_Customize_Manager` to handle deleting changeset drafts.
* Add `trashing` to `wp.customize.state` which is then used to update the UI.
* UI for trashing is pending design feedback. One possibility is to add a new trash button to Publish Settings section that invokes `wp.customize.previewer.trash()`.
* Improve logic for managing the visibility and disabled states for publish buttons.
* Prevent attempting `requestChangesetUpdate` while processing and bump processing while doing `save`.
* Update `changeset_date` state only if sent in save response.
* Merge `ThemesSection#loadThemePreview()` into `ThemesPanel#loadThemePreview()`.
* Remove unused `autosaved` state.
* Start autosaving and prompting at beforeunload after a change first happens. This is key for theme previews since even if a user did not make any changes, there were still dirty settings which would get stored in an auto-draft unexpectedly.
* Allow `Notification` to accept additional `classes` to be added to `container`.
* Introduce `OverlayNotification` and use for theme installing, previewing, and trashing. Such overlay notifications take over the entire window.

Props westonruter, celloexpressions.
See #37661, #39896, #21666, #35210.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 03:37:46 +00:00
Jeremy Felt
bdd50f28b4 Docs: Clarify docs for hooked count/date updates
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 03:20:47 +00:00
Jeremy Felt
78880a6a0b Multisite: Only update a site's post count when post types of post are updated.
Previously, the query to update the count of published posts would run every time any post type transitioned between a `publish`/non-published status or was deleted.

Props sboisvert, JPry, spacedmonkey.
Fixes #42021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 03:09:44 +00:00
Jeremy Felt
b47cf7330c Multisite: Use get_networks() instead of a direct query in get_admin_users_for_domain().
Props spacedmonkey.
Fixes #41806.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 03:06:47 +00:00
Gary Pendergast
f0492c5da8 Database: Fix some PHP errors introduced in [41662].
PHP < 5.4 requires a `$matches` parameter to be passed to `preg_match_all()`

`wpdb::prepare()` can be called before translations are loaded, so needs appropriate `wp_load_translations_early()` calls.

See #42040.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 02:45:47 +00:00
Gary Pendergast
1603a9e067 Database: Throw a notice if wpdb::prepare() is called with an incorrect number of arguments
`wpdb::prepare()` currently gives no information if the number of arguments passed doesn't match the number of placeholders in the query. This change gives an explicit notice that the call was incorrect.

Also fixes an enrelated term meta test that was triggering this new notice.

Props thekt12 for the initial patch.
Fixes #42040.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 02:11:47 +00:00
Jeremy Felt
abdfe59c28 Multisite: Use get_current_blog_id() instead of $wpdb->blogid.
`get_current_blog_id()` is more appropriate for determining the ID of the current site in most cases. This eliminates the need for the global `$wpdb` in several functions and is better than the implicit global used in admin pages.

Props bnap00, spacedmonkey.
Fixes #41684.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 01:44:47 +00:00
Gary Pendergast
5f19289fc2 Docs: Clarify the docs for wpdb::prepare().
Make the usage of the `%` wildcard in queries clearer.

Props jrf.
Fixes #41983.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 00:22:45 +00:00
Jeremy Felt
d5acf636b0 Build/Test Tools: Add ms-files test group to sub-task list.
Previously, the `ms-files` test group would not run in any automatic configuration. This ensures it is always run as part of the test suite in Travis CI.

Props netweb.
Fixes #41698.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-01 22:16:48 +00:00
Andrea Fercia
1f4dab28fe Accessibility: Improve the Theme Details modal accessibility.
- sets the modal content to `role="document"` to make screen readers switch back to browse mode
- standardizes the Themes screen and Customizer modals interaction
- Themes screen modal: sets initial focus on the modal overlay instead of the primary button, avoiding to "skip" content for keyboard and screen reader users

Fixes #42055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-01 13:48:46 +00:00
Adam Silverstein
e23b4e9269 REST API JavaScript Client: improve support for model deletion/trash.
Update the way and location the JavaScript client determines which models/endpoints require the `force=true` parameter when being deleted to avoid a `rest_trash_not_supported` error. Identify models with endpoints that support DELETE, excluding those that support the trash (posts and pages by default). Also, move the check into the default `wp.api.WPApiBaseModel.initialize()` function.

Props caercam, euthelup.
Fixes #40672.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-01 13:07:45 +00:00
Andrew Ozz
40d84f7503 Editor: Use editor.$ to improve removeSelectionMarker().
See #42029
Built from https://develop.svn.wordpress.org/trunk@41656


git-svn-id: http://core.svn.wordpress.org/trunk@41490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-01 10:33:47 +00:00
Andrew Ozz
5335ba8c20 Editor: pass the DOM library instance instead of a (fake) editor instance to getCursorMarkerSpan().
See #42029
Built from https://develop.svn.wordpress.org/trunk@41655


git-svn-id: http://core.svn.wordpress.org/trunk@41489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-01 09:42:47 +00:00
Felix Arntz
eedca8f3da Multisite: Fix wp_get_users_with_no_role() possibly including users with a role on a different site.
Prior to this change, when passing another site than the current one to `wp_get_users_with_no_role()` through its `$site_id` parameter, the function still used the roles available on the current site, which would cause users with other roles that possibly exist on the other site to show up as users without a role. Switching the site before retrieving the available rules fixes the issue.

Fixes #42015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-30 04:10:45 +00:00
Felix Arntz
5edfea22b9 Multisite: Fix count_users() possibly querying incorrect roles when passed a different site ID.
The `time` strategy in `count_users()` queries users by role. However, the roles queried for were not affected by passing another site than the current one through the `$site_id` parameter, causing users having roles that were not queried for to appear as users without a role. This changeset fixes the issue by switching the site before retrieving the roles to query for.

Fixes #42014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-30 03:54:45 +00:00
Felix Arntz
b0aaa16b32 Multisite: Display correct roles in Network > Site Users screen for sites other than the main site.
Props jeremyfelt.
Fixes #42013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-30 03:20:46 +00:00
Weston Ruter
e0c3951b08 Embeds: Cache oEmbeds in an oembed_cache custom post type instead of postmeta when there is no global $post.
Add processing of embeds to rich Text widget.

Props swissspidy, westonruter, ocean90, johnbillion.
See #40854, #39994, #40935.
Fixes #34115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-30 01:15:48 +00:00
Weston Ruter
e90b5ee669 Customize: Remove unused JS variables to fix JSHint.
Amends [41649].
See #37661, #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:04:47 +00:00
Weston Ruter
57044ac71e Customize: Improve interactions between the Themes panel and Publish Settings section.
* Deactivate the Themes panel immediately after changing selected status to non-publish.
* Animate publish settings button into view with publish button when collapsing Themes panel.
* Deactivate publish settings section and hide publish settings button entirely when customizer state is clean.
* Harden access of Themes panel in case it was removed by plugin.
* Fix throttling of `renderScreenshots` calls in `ThemesSection`.

Amends [41648], [41626].
See #37661, #39896, #34843.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 21:52:45 +00:00
Weston Ruter
76f590b99b Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.

Also includes CSS auto-prefixing added via `grunt precommit:css`.

For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/

Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 20:13:50 +00:00
John Blackbourn
fb30317bad Build/Test tools: Partially revert [41367] as gd and exif aren't actually required to run WordPress.
See #41851

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


git-svn-id: http://core.svn.wordpress.org/trunk@41481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 19:57:47 +00:00
Andrew Ozz
309c5559b4 Editor: improve attaching a callback on editor init.
See #42029
Built from https://develop.svn.wordpress.org/trunk@41646


git-svn-id: http://core.svn.wordpress.org/trunk@41480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 19:12:47 +00:00
Andrew Ozz
e4bd7a86a6 Editor: Improve keeping text selection when switching between Visual and Text modes.
Props biskobe.
See #42029.
Built from https://develop.svn.wordpress.org/trunk@41645


git-svn-id: http://core.svn.wordpress.org/trunk@41479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 17:50:45 +00:00
Sergey Biryukov
c1686e75bf Posts, Post Types: Correct test_submitting_comment_to_trashed_post_returns_error().
`wp_trash_post()` accepts a post ID, not a `WP_Post` object.

See #42030.
Built from https://develop.svn.wordpress.org/trunk@41644


git-svn-id: http://core.svn.wordpress.org/trunk@41478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 15:10:47 +00:00
Andrew Ozz
8fc05d8fba TinyMCE: fix "flickering inline toolbar" in Chrome in RTL mode by not showing tooltips while an inline toolbar is shown.
Fixes #42018.
Built from https://develop.svn.wordpress.org/trunk@41643


git-svn-id: http://core.svn.wordpress.org/trunk@41477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 14:25:47 +00:00
Sergey Biryukov
79ffa7ff2a Posts, Post Types: In wp_delete_post(), wp_trash_post(), wp_untrash_post(), and wp_delete_attachment(), standardize on WP_Post as a return value and internal representation of the post data.
Props bor0, SergeyBiryukov.
Fixes #42030.
Built from https://develop.svn.wordpress.org/trunk@41642


git-svn-id: http://core.svn.wordpress.org/trunk@41476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 13:36:46 +00:00
Sergey Biryukov
6a2b59745e I18N: Use a consistent pattern for translator comments for placeholders in wp-admin/includes/dashboard.php.
See #41974.
Built from https://develop.svn.wordpress.org/trunk@41641


git-svn-id: http://core.svn.wordpress.org/trunk@41475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 11:44:45 +00:00
Sergey Biryukov
10c46f5751 I18N: Use a consistent pattern for translator comments for placeholders in Customizer and widget strings.
Props danieltj, Rahmohn.
Fixes #41974.
Built from https://develop.svn.wordpress.org/trunk@41640


git-svn-id: http://core.svn.wordpress.org/trunk@41474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 11:42:48 +00:00
Sergey Biryukov
033b371145 I18N: Improve i18n in help text for Custom HTML widget and Additional CSS section.
Fixes #42032.
Built from https://develop.svn.wordpress.org/trunk@41639


git-svn-id: http://core.svn.wordpress.org/trunk@41473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 11:10:50 +00:00
Sergey Biryukov
70925e6741 Posts, Post Types: Introduce pre_trash_post and pre_untrash_post filters to allow for short-circuiting wp_trash_post() and wp_untrash_post().
This brings parity with `pre_delete_post` filter in `wp_delete_post()`, introduced in [34082].

Props bor0.
Fixes #42030.
Built from https://develop.svn.wordpress.org/trunk@41638


git-svn-id: http://core.svn.wordpress.org/trunk@41472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 10:19:49 +00:00
John Blackbourn
32b555d0a7 Build/Test tools: Update the WP_PHPUnit_Util_Getopt class for PHP 7.2 compatibility.
This removes usage of `each()` which is deprecated in PHP 7.2.

Props ayeshrajans

See #40109
Fixes #41525

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


git-svn-id: http://core.svn.wordpress.org/trunk@41471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 23:15:47 +00:00
John Blackbourn
d306285fa2 Build/Test tools: Update some test cases in anticipation of code formatting corrections.
These two tests assume a certain level of indentation in code which does not conform to core's coding
standards and will hopefully be corrected at some point in #41057.

See #41057

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


git-svn-id: http://core.svn.wordpress.org/trunk@41470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 22:56:50 +00:00
Dominik Schilling
9e097490af Embeds: In switched state, restore previous state if no post ID is found.
Fixes #40673.
Built from https://develop.svn.wordpress.org/trunk@41634


git-svn-id: http://core.svn.wordpress.org/trunk@41469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 16:29:45 +00:00
John Blackbourn
0d629ec963 External Libraries: Update the Text_Diff_Engine_native class for PHP 7.2 compatibility.
This removes usage of `each()` and usage of text strings passed to `assert()`.

Props bor0

Fixes #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 13:59:45 +00:00
Gary Pendergast
c805479c8b Docs: Update the documentation for wpdb::prepare()
The inline documentation for `wpdb::prepare()` was kind of confusing, and didn't describe some of the behaviour correctly.

Fixes #41983.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 11:45:45 +00:00
Gary Pendergast
3a4e78f9bd Setup: Hide database errors while testing the table prefix.
If DB errors are shown during installation, the table prefix test will also show an error, even though we're deliberately trying to generate that error.

Fixes #40655.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 07:58:46 +00:00
Gary Pendergast
ef3720ac49 Post Editor: Keep text selection between Visual and Text modes
When switching between post editor modes, the current cursor position and selection is now preserved. This allows authors to switch modes without losing the context of where they were in the document.

Props biskobe.
Fixes #41962.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 06:45:46 +00:00
Gary Pendergast
dbd93ddbb6 Database: Add support for connecting to IPv6 hosts
IPv4 addresses are scarce, overworked, and underpaid. They're ready to retire, but we just won't let them go. If you care about their wellbeing, switch to IPv6 today.

Props schlessera, birgire.
Fixes #41722.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 05:37:44 +00:00
Gary Pendergast
0028a9555e Database: Don't quote placeholders in queries going through $wpdb->prepare()
To bring Core into line with the changes to `$wpdb->prepare()` in WordPress 4.8.2, query placeholders shouldn't be quoted.

Props jrf, johnjamesjacoby.
Fixes #41983.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 04:32:46 +00:00
Gary Pendergast
88f71a8adf Options: Add new alloptions and pre_cache_alloptions filters.
`pre_cache_alloptions` is run before the alloptions array is inserted into the cache, and is valuable for sanity checking the options, particularly if your caching scheme has size limitations.

`alloptions` is run before returning the alloptions array, and is useful for when you have extra information that alloptions should return.

Props sebastian.pisula, keesiemeijer.
Fixes #33958.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-28 00:23:47 +00:00
Weston Ruter
8043c2d8e5 Customize: Introduce drafting and scheduling for Customizer changesets.
* Incorporates code from the Customize Snapshots and Customize Posts feature plugins.
* Adds a new Publish Settings section for managing the changeset status, scheduled date, and frontend preview link.
* Updates Publish button to reflect the status selected in the Publish Settings (including Save Draft and Schedule).
* Deactivates the Themes section when a non-publish status selected, and deactivates the Publish Settings section when previewing a theme switch.
* Introduces an `outer` section type (`wp.customize.OuterSection` in JS) for the Publish Settings section to use and for available widgets and available nav menu panels to use in the future. These sections can be expanded while other sections are expanded.
* Introduces `WP_Customize_Date_Time_Control` in PHP and `wp.customize.DateTimeControl` in JS for managing a date/time value.
* Keeps track of scheduled time and proactively publish from the client when the time arrives, as opposed to waiting for WP Cron.
* Auto-publishes a scheduled changeset when attempting to access one that missed its schedule.
* Starts a new changeset if attempting to save a changeset that was previously publish.
* Adds `force` arg to `requestChangesetUpdate()` to force an update request even when there are no pending changes.
* Adds utils methods for `getCurrentTimestamp` and `getRemainingTime`.
* Adds new state values for `selectedChangesetStatus`, `changesetDate`, `selectedChangesetDate`.
* Fixes logic for when to short-circuit check to close Customizer when there are unsaved changes.
* Adds getter methods for `autosaved` and `branching` parameters, with the latter applying the `customize_changeset_branching` filter.
* Call to `establish_loaded_changeset` on the fly when `changeset_uuid()` is called if no changeset UUID was specififed.
* De-duplicates logic for dismissing auto-draft changesets.
* Includes unit tests.

Builds on [41597].
Props sayedwp, westonruter, melchoyce, JoshuaWold, folletto, stubgo, karmatosed, dlh, paaljoachim, afercia, johnregan3, utkarshpatel, valendesigns.
See #30937.
Fixes #39896, #28721, #39275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 22:25:46 +00:00
Felix Arntz
0892a6ebbf Multisite: Improve initializing available roles when switch sites.
Switching the available roles and the current user's capabilities no longer happens in `switch_to_blog()` and `restore_current_blog()`, instead it has been moved to a new function `wp_switch_roles_and_user()` which is hooked into the site switching process. This allows to improve performance by temporarily unhooking the function when roles and capabilities do not need to be switched.

This change ensures that switching available roles now works closer to switching user capabilities, particularly the changes in [41624]. A new `WP_Roles::for_site( $site_id )` method has been introduced, and the `WP_Roles::_init()` method has been deprecated. It is furthermore possible to retrieve the site ID for which the available roles are currently initialized through a new `WP_Roles::get_site_id()`.

Props johnjamesjacoby, flixos90.
Fixes #38645.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 21:44:44 +00:00
Felix Arntz
21f18c2d30 Multisite: Initialize a user's roles correctly when setting them up for a different site.
While it has always been possible to initialize a user's roles and capabilities for another site than the current one in a multisite, the actual roles available were not switched prior to this change, possibly causing invalid roles to show up or actually valid capabilities not being available.

In order to fix this bug in a clean way, relevant parts of the `WP_User` class have been refactored. The ID of the site for which capabilities are currently initialized are now stored in a private property `WP_User::$site_id`. The `WP_User::for_blog( $blog_id )` and `WP_User::_init_caps( $cap_key )` methods have been deprecated in favor of `WP_User::for_site( $site_id )`. In addition, a new method `WP_User::get_site_id()` has been introduced to retrieve the site ID for which the user's capabilities are currently initialized.

Props ryanduff, jeremyfelt, flixos90.
Fixes #36961.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 21:10:45 +00:00
John Blackbourn
7fc820382a Users: Remove the failing tests added in [41613] while they're investigated.
See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 17:42:46 +00:00
Andrea Fercia
c65fe27ba1 Accessibility: Update and standardize the admin screen-reader-text CSS class.
Given the new WordPress browsers support policy, the `screen-reader-text` css
class used in the admin can be updated to use modern CSS and correct syntax. See
https://github.com/wpaccessibility/a11ythemepatterns/blob/master/read-more-links/style.css

Worth noting the `clip` property is deprecated and kept for IE11 and Edge.

- uses `clip-path` for modern browsers
- keeps `clip` for old browsers and update its value to a correct syntax
- resets `clip-path` to `none` where the class is used to dynamically reveal elements
- removes an old rule that made `screen-reader-text` completely invisible in the help tabs `#screen-meta`
- standardizes the rule across CSS files

Fixes #40970.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 17:27:45 +00:00
Andrea Fercia
8c7a2b1d54 Accessibility: Improve the sidebar toggles in the Widgets screen.
- uses button elements for the toggles
- uses `aria-expanded` on the toggles to communicate to assistive technologies the panels expanded/collapsed state
- adds the "circular focus" style to the toggles to give users a clear indication of the currently focused element
- standardizes CSS class names to `.toggle-indicator` and `.handlediv` as these names are already used across the admin for similar controls

Props monikarao, xavortm, mihai2u, Kopepasah.
Fixes #37013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 16:29:44 +00:00
Andrew Ozz
ddfa468e38 TinyMCE: disable the tests for wptextpatterns plugin in PhantomJS.
See #42009
Built from https://develop.svn.wordpress.org/trunk@41620


git-svn-id: http://core.svn.wordpress.org/trunk@41455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 16:22:46 +00:00
Pascal Birchler
f71a685b11 Upgrade/Install: Update unit tests after [41611].
See #40764.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 15:15:47 +00:00
John Blackbourn
2429d4acea Taxonomy: Introduce a back_to_items taxonomy label.
This is used after updating a taxonomy term in the link to return to the term listing screen.

Props benoitchantre

Fixes #41898

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


git-svn-id: http://core.svn.wordpress.org/trunk@41453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 14:39:45 +00:00
John Blackbourn
50a7d2b121 Options, Meta APIs: Require a confirmation link in an email to be clicked when a user attempts to change the network
admin email address on Multisite.

This mirrors the same functionality for the site admin email address and user profile email address.

Fixes #41254

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


git-svn-id: http://core.svn.wordpress.org/trunk@41452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 14:17:45 +00:00
John Blackbourn
5c7a7a2989 Embeds: Documentation alignment following [41615].
See #38181

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


git-svn-id: http://core.svn.wordpress.org/trunk@41451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:27:44 +00:00
John Blackbourn
4b76c1f22f Embeds: Add support for Amazon Kindle instant previews.
Props jsepia, morganestes, adamsilverstein, swissspidy, jbpaul17, johnbillion, rugved

Fixes #38181

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


git-svn-id: http://core.svn.wordpress.org/trunk@41450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:26:45 +00:00
John Blackbourn
255658fa31 Users: There is not, in fact, 12345 users on every WordPress installation.
Props spacedmonkey

See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:07:46 +00:00
John Blackbourn
807bc5a6c9 Users: Introduce the concept of a large site in order to speed up the Users screen when there are many users.
Calling the `count_users()` function is expensive, regardless of the counting strategy that's used, and it gets
slower the more users there are on a site. In order to speed up the Users screen in the admin area, calling
`count_users()` can be avoided entirely while still displaying the total count for users.

This introduces some new functions:

* `wp_is_large_user_count()`
* `wp_get_active_user_count()`
* `wp_update_active_user_count()`

A corresponding `wp_is_large_user_count` filter is also introduced.

Props tharsheblows, johnbillion

Fixes #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:04:47 +00:00
Pascal Birchler
0fe4c3b3f2 Upgrade/Install: Fix updating plugins on the Add Plugins screen.
Props imath.
Fixes #41407.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 11:59:47 +00:00
Pascal Birchler
2dd83960b9 Upgrade/Install: Show new version number when updating a theme on Multisite.
Props afragen.
Fixes #40764.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 09:44:45 +00:00
Pascal Birchler
95d8b4fa44 Themes: Adjust unit test after [41607].
Props ocean90.
See #40820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:53:44 +00:00
Pascal Birchler
5e7ce2a61a Plugins: Fix version number in docblock after [41608].
Props ocean90.
See #37430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:52:47 +00:00
Pascal Birchler
1f5c7470fb Plugins: Improve error messages on plugins screen.
This unifies the layout and wording of error messages on both the plugins screen and the themes screen.

Props tinkerbelly, juhise, Ankit K Gupta, m1tk00, swissspidy, mrahmadawais, danieltj.
Fixes #37430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:46:45 +00:00
Pascal Birchler
e7beaa590f Themes: Adjust translated string after [41601].
Props obenland.
See #40820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:38:45 +00:00
Pascal Birchler
81a8f1cffe Embeds: Maintain switched state when embedding a post on Multisite.
Props bor0.
Fixes #40673.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:36:48 +00:00
Dion Hulse
db86c635ba Standardise on performing api.WordPress.org requests over SSL when possible, falling back to non-SSL when appropriate.
This also standardises the `User-Agent` used when communicating with WordPress.org, allowing for more consistent version detection.

Fixes #42004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:00:49 +00:00
Andrew Ozz
b32256701a TinyMCE: update to 4.6.7, changelog: https://www.tinymce.com/docs/changelog/#version467september182017.
Fixes #41996 #40956
Built from https://develop.svn.wordpress.org/trunk@41604


git-svn-id: http://core.svn.wordpress.org/trunk@41439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 21:15:47 +00:00
Weston Ruter
cb8173e053 Customize: Dismiss all autosaved auto-drafts for user and not just the one suggested when dismissing restoration notification.
Amends [41597].
See #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 20:33:46 +00:00
Mel Choyce
eb38b0da9b Customizer: Improve small-screen styles in Widgets panel.
Props mrasharirfan, mrahmadawais.
Fixes #41614.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 19:05:46 +00:00
Pascal Birchler
1ac10346ce Themes: Report theme as broken that sets itself as its parent.
Props davilera.
Fixes #40820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 08:54:47 +00:00
Pascal Birchler
742fc18cca Embeds: Improve performance when embedding a post on Multisite.
After [37798], this fixes embeds coming from a different site in the network.

Props imath.
Fixes #40673. See #36767. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@41435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 08:40:47 +00:00
Dion Hulse
af3c440b1d Embeds: Switch the Imgur oEmbed endpoint to use SSL as the HTTP version has been deprecated.
Props swissspidy.
Fixes #41984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 08:33:44 +00:00
Pascal Birchler
fce70235f2 Permalinks: Change structure tag button state more reliably.
Changes the highlighted tag buttons accordingly when selecting one of the commong permalink settings.

Deprecates `options_permalink_add_js()` as that JavaScript isn't added inline anymore.

Fixes #29872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 08:24:46 +00:00
Weston Ruter
1a7616ad54 Customize: Extend changesets to support autosave revisions with restoration notifications, and introduce a new default linear history mode for saved changesets (with a filter for opt-in to changeset branching).
* Autosaved changes made on top of `auto-draft` changesets get written on top of the `auto-draft` itself, similar to how autosaves for posts will overwrite post drafts.
* Autosaved changes made to saved changesets (e.g. `draft`, `future`) will be placed into an autosave revision for that changeset and that user.
* Opening the Customizer will now prompt the user to restore their most recent auto-draft changeset; if notification is dismissed or ignored then the auto-draft will be marked as dismissed and will not be prompted to user in a notification again.
* Customizer will no longer automatically supply the `changeset_uuid` param in the `customize.php` URL when branching changesets are not active.
* If user closes Customizer explicitly via clicking on X link, then autosave auto-draft/autosave will be dismissed so as to not be prompted again.
* If there is a changeset already saved as a `draft` or `future` (UI is forthcoming) then this changeset will now be autoloaded for the user to keep making additional changes. This is the linear model for changesets.
* To restore the previous behavior of the Customizer where each session started a new changeset, regardless of whether or not there was an existing changeset saved, there is now a `customize_changeset_branching` hook which can be filtered to return `true`.
* `wp.customize.requestChangesetUpdate()` now supports a second with options including `autosave`, `title`, and `date`.
* The window `blur` event for `customize.php` has been replaced with a `visibilitychange` event to reduce autosave requests when clicking into preview window.
* Adds `autosaved` and `branching` args to `WP_Customize_Manager`.
* The `changeset_uuid` param for `WP_Customize_Manager` is extended to recognize a `false` value which causes the Customizer to defer identifying the UUID until `after_setup_theme` in the new `WP_Customize_Manager::establish_loaded_changeset()` method.
* A new `customize_autosaved` query parameter can now be supplied which is passed into the `autosaved` arg in `WP_Customize_Manager`; this option is an opt-in to source data from the autosave revision, allowing a user to restore autosaved changes.

Props westonruter, dlh, sayedwp, JoshuaWold, melchoyce.
See #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 07:38:45 +00:00
Felix Arntz
85712eb281 Multisite: Fix documentation issues for domain_exists().
Props stevenlinx.
Fixes #41619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 00:12:45 +00:00
Weston Ruter
f1779f24ed Code Editors: Update the current file highlight to use notice styling.
Improves color contrast and readability, and reuses a core design pattern.

Props kekkakokkers, monopine, Travel_girl, afercia, melchoyce, karmatosed.
Fixes #31604.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 21:46:47 +00:00
Konstantin Obenland
eea0e5f6f5 Widgets: Merge orphaned widgets on theme switch
Merges orphaned widgets into the inactive sidebar when switching themes.

Props bpayton.
See #39693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 16:19:46 +00:00
Sergey Biryukov
9597082ec9 Twenty Seventeen: Add Docker Hub icon to supported social links.
Props xkon.
Fixes #41529.
Built from https://develop.svn.wordpress.org/trunk@41593


git-svn-id: http://core.svn.wordpress.org/trunk@41426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 13:49:43 +00:00
Sergey Biryukov
01efcd51a6 Twenty Seventeen: Add Periscope icon to supported social links.
Props xkon.
Fixes #40959.
Built from https://develop.svn.wordpress.org/trunk@41592


git-svn-id: http://core.svn.wordpress.org/trunk@41425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 13:14:45 +00:00
Sergey Biryukov
486ab09a0e I18N: Add translator comments for placeholders in WP_REST_Controller strings.
Props ramiy.
Fixes #41667.
Built from https://develop.svn.wordpress.org/trunk@41591


git-svn-id: http://core.svn.wordpress.org/trunk@41424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 10:27:43 +00:00
Weston Ruter
bb97df7b5f Widgets: Introduce Gallery widget for displaying image galleries.
* Galleries are managed in the widget in the same way they are managed in the post editor, both using the media manager.
* Gallery widget is merged from the Core Media Widgets v0.2.0 feature plugin and it extends `WP_Widget_Media` in the same way as is done for image, audio, and video widgets.
* Model syncing logic is updated to support booleans and arrays (of integers).
* Placeholder areas in media widgets are now clickable shortcuts for selecting media.
* Image widget placeholder is updated to match gallery widget where clicking preview is shortcut for editing media.

Props westonruter, joemcgill, timmydcrawford, m1tk00, obenland, melchoyce.
See #32417.
Fixes #41914.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 06:28:45 +00:00
Sergey Biryukov
4865841343 Posts, Post Types: Pass the order parameter to get_{$adjacent}_post_sort filter.
Props manchumahara.
Fixes #41924.
Built from https://develop.svn.wordpress.org/trunk@41589


git-svn-id: http://core.svn.wordpress.org/trunk@41422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 23:01:44 +00:00
Sergey Biryukov
4a42f4e835 I18N: Replace code fragments in translatable strings for rest_trash_not_supported errors with a placeholder.
Props ramiy.
Fixes #41643.
Built from https://develop.svn.wordpress.org/trunk@41588


git-svn-id: http://core.svn.wordpress.org/trunk@41421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 22:29:46 +00:00
Sergey Biryukov
982ba72da9 I18N: Replace method name in a translatable string in WP_REST_Controller::register_routes() with a placeholder.
Props ramiy.
Fixes #41667.
Built from https://develop.svn.wordpress.org/trunk@41587


git-svn-id: http://core.svn.wordpress.org/trunk@41420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 22:04:46 +00:00
Andrea Fercia
d1948f623a Accessibility: CodeMirror editing areas minor improvements.
- properly labels all the code editor areas (Theme/Plugin, Custom HTML widget, Additional CSS), whether CodeMirror is enabled or disabled
- adds `role="textbox"` and `aria-multiline="true"` to the CodeMirror editing area to allow assistive technologies properly identify it as a textarea
- standardizes the "keyboard trap" help text across the admin and keeps it as a list for better readability
- use the Help text elements as target for `aria-describedby`, to make screen readers read out the help text when focusing the editors
- fixes the `aria-expanded` attribute usage in the Customizer "Additional CSS" help toggle
- moves focus to the CodeMirror editing area when clicking on the associated label
- in the Plugin editor screen: changes a `<big>` element to `<h2>` for better semantics and consistency with the Theme editor screen
- also, removes a few textdomain leftovers, see `better-code-editing` and `default`

Props westonruter, melchoyce, afercia.
Fixes #41872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 16:00:46 +00:00
Sergey Biryukov
0170c40e24 Plugins: Restore "Clear List" button functionality for recently active plugins.
Props obenland.
Fixes #41080.
Built from https://develop.svn.wordpress.org/trunk@41585


git-svn-id: http://core.svn.wordpress.org/trunk@41418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 15:16:46 +00:00
Andrew Ozz
a5f8097899 Retire Press This and extract it to a plugin. First run.
Props kraftbj, azaozz.
See #41689.
Built from https://develop.svn.wordpress.org/trunk@41584


git-svn-id: http://core.svn.wordpress.org/trunk@41417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 14:22:54 +00:00
Sergey Biryukov
400bc41731 I18N: Allow for post custom field name in the_meta() to be translated, e.g. to insert a non-breaking space before the colon.
Props audrasjb, johnbillion.
Fixes #41653.
Built from https://develop.svn.wordpress.org/trunk@41583


git-svn-id: http://core.svn.wordpress.org/trunk@41416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 11:28:46 +00:00
Weston Ruter
58761c1ff2 Customize: Remove unnecessary call to refresh() a CodeMirror instance upon focus in Code Editor control.
This also fixes an issue with the cursor not being set in the expected location with an `inputStyle=contenteditable`.

Props afercia.
See #41897.
Fixes #41900.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 18:46:49 +00:00
Sergey Biryukov
d379f839cf Posts, Post Types: Pass $post parameter to post_submitbox_start, attachment_submitbox_misc_actions, media_submitbox_misc_sections, audio_submitbox_misc_sections filters.
Props sebastian.pisula, SergeyBiryukov.
Fixes #36206.
Built from https://develop.svn.wordpress.org/trunk@41581


git-svn-id: http://core.svn.wordpress.org/trunk@41414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 17:07:46 +00:00
Sergey Biryukov
29fa55f71d Twenty Sixteen: After [41343], add missing space to if condition in twentysixteen_content_image_sizes_attr().
Fixes #38468.
Built from https://develop.svn.wordpress.org/trunk@41580


git-svn-id: http://core.svn.wordpress.org/trunk@41413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 12:25:45 +00:00
Sergey Biryukov
fa5abb2474 I18N: Remove HTML tags from translatable strings in wp-activate.php.
Props ramiy.
Fixes #41645.
Built from https://develop.svn.wordpress.org/trunk@41579


git-svn-id: http://core.svn.wordpress.org/trunk@41412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 12:21:47 +00:00
Sergey Biryukov
649eb34d2a Login and Registration: Replace home URL in password reset email with the site name to avoid confusing the user with multiple links.
Props Presskopp, code-monkey.
Fixes #38328.
Built from https://develop.svn.wordpress.org/trunk@41578


git-svn-id: http://core.svn.wordpress.org/trunk@41411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:44:46 +00:00
Sergey Biryukov
b844c63db0 Customize: Tweak "New Custom HTML Widget" pointer text to be a bit less informal and more inclusive.
Props birgire, mrasharirfan, danieltj.
Fixes #41798.
Built from https://develop.svn.wordpress.org/trunk@41577


git-svn-id: http://core.svn.wordpress.org/trunk@41410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:26:46 +00:00
Sergey Biryukov
c28cc57f3b Quick/Bulk Edit: Remove duplicate inline-edit-{$screen->post_type} CSS class from Quick Edit table rows.
Props ibachal.
Fixes #41906.
Built from https://develop.svn.wordpress.org/trunk@41576


git-svn-id: http://core.svn.wordpress.org/trunk@41409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:02:46 +00:00
Sergey Biryukov
77f011704e XML-RPC: Update the string in test_parent_for_nonhierarchical() to match the string added in [41574].
Props netweb.
Fixes #41637.
Built from https://develop.svn.wordpress.org/trunk@41575


git-svn-id: http://core.svn.wordpress.org/trunk@41408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 08:20:49 +00:00
Sergey Biryukov
b8edb91f43 I18N: Merge two similar "Cannot set parent term" error strings.
Props ramiy.
Fixes #41637.
Built from https://develop.svn.wordpress.org/trunk@41574


git-svn-id: http://core.svn.wordpress.org/trunk@41407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 22:08:46 +00:00
Sergey Biryukov
6fa2cea232 Docs: Add @access private entries for _get_component_from_parsed_url_array() and _wp_translate_php_url_constant_to_key().
Props ajayghaghretiya1.
Fixes #41282.
Built from https://develop.svn.wordpress.org/trunk@41573


git-svn-id: http://core.svn.wordpress.org/trunk@41406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 22:00:47 +00:00
Sergey Biryukov
bcb126292c I18N: Merge two similar error strings.
Props ramiy.
Fixes #39172.
Built from https://develop.svn.wordpress.org/trunk@41572


git-svn-id: http://core.svn.wordpress.org/trunk@41405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:55:45 +00:00
Andrew Ozz
58b769a057 Plupload: also delete plupload.full.min.js when updating.
See #41755.
Built from https://develop.svn.wordpress.org/trunk@41571


git-svn-id: http://core.svn.wordpress.org/trunk@41404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:48:46 +00:00
Andrew Ozz
41ad3f294f Plupload: minify and load plupload.js and moxie.js separately to make them easier to debug.
Props gmariani405, azaozz.
Fixes #41755.
Built from https://develop.svn.wordpress.org/trunk@41570


git-svn-id: http://core.svn.wordpress.org/trunk@41403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:10:48 +00:00
Sergey Biryukov
b07cffe99a Media: Improve the preview of transparent images in Attachment Details modal by using CSS3 to show a checkered background.
Props powerzilly, stevepuddick.
Fixes #41948.
Built from https://develop.svn.wordpress.org/trunk@41569


git-svn-id: http://core.svn.wordpress.org/trunk@41402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 19:57:47 +00:00
Sergey Biryukov
7c4cdbff27 Admin CSS: Autoprefixer for [41329].
See #39662.
Built from https://develop.svn.wordpress.org/trunk@41568


git-svn-id: http://core.svn.wordpress.org/trunk@41401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 19:51:47 +00:00
Sergey Biryukov
ba67e5f09c Docs: Correct filename references in duplicate hook comments for post_password_required filter.
Props coffee2code.
Fixes #41959.
Built from https://develop.svn.wordpress.org/trunk@41567


git-svn-id: http://core.svn.wordpress.org/trunk@41400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 18:34:45 +00:00