Commit Graph

13496 Commits

Author SHA1 Message Date
Sergey Biryukov 513b862cc6 Docs: Add missing article in `setExpectedDeprecated()` DocBlock.
See #46543.
Built from https://develop.svn.wordpress.org/trunk@44923


git-svn-id: http://core.svn.wordpress.org/trunk@44754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 13:11:50 +00:00
Sergey Biryukov 42d1407a66 Docs: Correct `@param` name in `setExpectedIncorrectUsage()` DocBlock.
Props yoavf.
Fixes #46546.
Built from https://develop.svn.wordpress.org/trunk@44922


git-svn-id: http://core.svn.wordpress.org/trunk@44753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 12:23:51 +00:00
Sergey Biryukov 81ca7552b8 Docs: Improve documentation for `wp_die()` handlers.
See #46543.
Built from https://develop.svn.wordpress.org/trunk@44921


git-svn-id: http://core.svn.wordpress.org/trunk@44752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:45:50 +00:00
Sergey Biryukov 72b33ec883 Docs: Correct grammar in PemFTP description.
Props umang7.
Fixes #46507.
Built from https://develop.svn.wordpress.org/trunk@44920


git-svn-id: http://core.svn.wordpress.org/trunk@44751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:20:49 +00:00
Sergey Biryukov 2ba199472f Docs: Use 3-digit, x.x.x style semantic versioning for `@since 2.5.0` entries in `wp-admin/includes/class-ftp.php`.
Missed in [26868].

Props mukesh27.
See #46507.
Built from https://develop.svn.wordpress.org/trunk@44919


git-svn-id: http://core.svn.wordpress.org/trunk@44750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:18:50 +00:00
Andrea Fercia 31e34400a5 Accessibility: Login: Display error messages when both the username and password fields are empty.
For accessibility and usability, if an input error is detected, the item that is in error needs to be identified and the error needs to be described to the user in text (WCAG Success Criterion 3.3.1). The login form displays an error when the username field is empty or when the password field is empty. It omits to do so when both fields are empty.

This change restores the login form behavior to the one that used to work in WordPress 2.3 (!) and displays the related error messages also when both fields are empty.

Props birgire, audrasjb.
See #8938, #5405, #3708.
Fixes #42985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-16 15:22:53 +00:00
Peter Wilson fff2440ba5 Cron: Ensure identical single events aren't scheduled less than 10min apart.
Improves the logic in `wp_schedule_single_event()` to ensure an identical event is not scheduled within ten minutes.

This moves the logic for checking for identical events to be self contained rather than relying on `wp_next_scheduled()` as this fails to account for events with a past timestamp when wp-cron fails to trigger or for multiple identical events being scheduled already.

Props bodohugobarwich.
Fixes #44818.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-16 06:42:50 +00:00
Sergey Biryukov fd9ab30952 Coding Standards: Minor code and performance improvements in `phpunit/includes/abstract-testcase.php`.
Props andizer.
Fixes #46500.
Built from https://develop.svn.wordpress.org/trunk@44916


git-svn-id: http://core.svn.wordpress.org/trunk@44747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 22:14:49 +00:00
Sergey Biryukov e52b81354b Build/Test Tools: Add missing access modifiers in `phpunit/includes/wp-profiler.php`.
Props andizer.
Fixes #46505.
Built from https://develop.svn.wordpress.org/trunk@44915


git-svn-id: http://core.svn.wordpress.org/trunk@44746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 21:59:53 +00:00
Sergey Biryukov dd83d8f4c9 Coding Standards: Use strict comparison in `WP_Post` where possible.
Props andizer.
Fixes #46508.
Built from https://develop.svn.wordpress.org/trunk@44914


git-svn-id: http://core.svn.wordpress.org/trunk@44745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 21:55:50 +00:00
Andrew Ozz cd01464b52 TinyMCE: fix the TinyMCE help modal keyboard shortcut on Mac for the classic editor and classic block.
Fixes #45791.
Built from https://develop.svn.wordpress.org/trunk@44913


git-svn-id: http://core.svn.wordpress.org/trunk@44744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 21:43:50 +00:00
desrosj c84bb94796 Networks and Sites: Introduce `populate_site_meta` filter.
The `populate_site_meta` filter can be used to modify the site meta added during the creation of a new site. This filter mirrors the approach used for networks in `populate_network_meta`.

Props spacedmonkey, davidbaumwald.
Fixes #46437.
Built from https://develop.svn.wordpress.org/trunk@44912


git-svn-id: http://core.svn.wordpress.org/trunk@44743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 19:43:50 +00:00
Andrew Ozz f03ccf6813 TinyMCE: remove the reference to `skin.min.css.map` from `skin.min.css`. Fixes an unneeded 404 request.
Fixes #46533.
Built from https://develop.svn.wordpress.org/trunk@44911


git-svn-id: http://core.svn.wordpress.org/trunk@44742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 19:32:50 +00:00
desrosj ecfb6fd700 Privacy: Do not attempt to cleanup personal data export files when the directory does not exist.
Checking for the presence of the directory and returning early prevents PHP warnings when attempting to list files in a non-existent directory.

Props arena, garrett-eclipse.
Fixes #45136.
Built from https://develop.svn.wordpress.org/trunk@44910


git-svn-id: http://core.svn.wordpress.org/trunk@44741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 19:00:51 +00:00
desrosj 5ac3033d77 Privacy: Add unit tests for exporting and erasing personal data.
Props birgire, garrett-eclipse, desrosj.
Fixes #43438.
Built from https://develop.svn.wordpress.org/trunk@44909


git-svn-id: http://core.svn.wordpress.org/trunk@44740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 18:08:51 +00:00
desrosj 2019967721 Privacy: Improve data export/erasure error messages and translator comments.
These changes address inaccuracies in current messages and makes them more informative.

Props birgire, garrett-eclipse, desrosj.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@44908


git-svn-id: http://core.svn.wordpress.org/trunk@44739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 18:07:50 +00:00
desrosj b26621d336 Embeds: Allow post title to be filtered when preparing an oEmbed response.
By changing the way the post title is added to the array of data from `$post->post_title` to `get_the_title()`, the title can now be modified using the `the_title` filter. This ensures post titles returned in oEmbed responses are consistent with those that show on a site.

Props mheikkila, swissspidy.
Fixes #42826.
Built from https://develop.svn.wordpress.org/trunk@44907


git-svn-id: http://core.svn.wordpress.org/trunk@44738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 16:42:54 +00:00
desrosj 35b558a3a0 Privacy: Allow new requests to be created after a user’s existing one has been completed.
When dealing with personal data exports and erasure requests, it is important to have a log of all the requests for a specific person. This is often required to confirm when and how many times requests were completed and fulfilled properly. 

This change allows a new request to be created after a previous data request has reached completed status (`request-completed`) instead of requiring admins to delete or re-initiate the existing request. The latter approach removes the historical log of requests for that user when creating a new request.

Full unit tests for the `wp_create_user_request()` function are also included.

Props garrett-eclipse, cc0a, birgire, desrosj.
Fixes #44707.
Built from https://develop.svn.wordpress.org/trunk@44906


git-svn-id: http://core.svn.wordpress.org/trunk@44737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 16:27:49 +00:00
Andrea Fercia 8f69ebf812 Accessibility: Improve the semantics of "tabs" that are not real ARIA tabs.
Some "visual tabs" in the WordPress admin used links wrapped in a `h2` heading. While these tabs look like ARIA tabs, they're just navigation menus and should be marked-up as such to be correctly exposed to assistive technologies.
- changes the wrapping `<h2>` to a `<nav>` element: worth reminding `<nav>` elements also define ARIA landmarks
- adds an `aria-label` to the `<nav>` elements so they can be distinguished from other `<nav>` elements in the page
- adjusts the headings level in the Credits page

Props audrasjb, afercia.
Fixes #43398.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 14:54:52 +00:00
Sergey Biryukov 69c3e1facb PHPCS: Remove extra space added in [44902].
See #46499.
Built from https://develop.svn.wordpress.org/trunk@44904


git-svn-id: http://core.svn.wordpress.org/trunk@44735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 14:28:51 +00:00
Sergey Biryukov f8c8d2c880 Build/Test Tools: Add missing access modifiers to factory classes in `phpunit/includes/factory`.
Props andizer.
Fixes #46504.
Built from https://develop.svn.wordpress.org/trunk@44903


git-svn-id: http://core.svn.wordpress.org/trunk@44734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 12:16:50 +00:00
Sergey Biryukov 4b23ac31c9 Docs: Improve documentation for `phpunit/includes/abstract-testcase.php`.
Props andizer.
Fixes #46499.
Built from https://develop.svn.wordpress.org/trunk@44902


git-svn-id: http://core.svn.wordpress.org/trunk@44733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 12:02:51 +00:00
Sergey Biryukov 5404ae4949 Docs: Remove unnecessary `@see` tag in `wpdb::prepare()`.
The tag is only necessary for hooks. For functions and methods, autolinking is handled automatically on developer.wordpress.org.

Props mbelchev, ocean90, johannadevos.
Fixes #44585. See #45204.
Built from https://develop.svn.wordpress.org/trunk@44901


git-svn-id: http://core.svn.wordpress.org/trunk@44732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 11:18:50 +00:00
Andrea Fercia e9db7c48d2 Accessibility: improve the "URL" and "Alt text" fields in the media modals.
Many users found the attachment URL field confusing: it says "URL" so it may appear like a field meant to paste a URL into.
Also, the Alt text field is the most important one in terms of content, while the Title field needs to be de-emphasized.

- changes the URL field label to "Copy link"
- moves the alt text field to the top as first field 
- avoids to set initial focus on the alt text field 
- adds an explanatory text with a link pointing to the W3C "alt decision tree" tutorial 
- adds `aria-describedby` to target the explanatory text
- adjusts the CSS accordingly
- updates the QUnit index.html file

Props melchoyce, audrasjb, afercia.
Fixes #41612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 10:43:51 +00:00
Sergey Biryukov 904365731a Acessibility: Remove `title` attribute in `login_header()`.
* Deprecate `login_headertitle` filter, introduce `login_headertext` as a replacement.
* For backwards compatibility, if a `login_headertitle` is set, it will be used as link text.
* Make the login header logo URL and text consistent between single site and Multisite.
* Avoid ambiguity of where the WordPress logo points to; link to WordPress.org by default.
* `login_headerurl` filter is still available to change the URL of the header logo.

Props afercia, pratikkry, chetan200891.
Fixes #42537.
Built from https://develop.svn.wordpress.org/trunk@44899


git-svn-id: http://core.svn.wordpress.org/trunk@44730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 21:10:50 +00:00
Sergey Biryukov 2922b9b1b4 Docs: Add a `@since` tag for the new `$selected` parameter of `get_archives_link()`.
See #40662.
Built from https://develop.svn.wordpress.org/trunk@44898


git-svn-id: http://core.svn.wordpress.org/trunk@44729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 19:37:51 +00:00
Sergey Biryukov bba488f2b7 Widgets: Pre-select currently viewed archive in the Archives dropdown widget, for consistency with the Categories widget.
Props robobot3000, audrasjb, afercia, Themonic.
Fixes #40662.
Built from https://develop.svn.wordpress.org/trunk@44897


git-svn-id: http://core.svn.wordpress.org/trunk@44728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 19:31:49 +00:00
Andrea Fercia 72979b167d Accessibility: Improve the placeholder "prompt" text in the post title and Quick Draft widget.
Old browsers didn't support the HTML placeholder attribute. For a number of years, `<label>` elements have been used in a few places in WordPress to emulate placeholders. It's time to improve semantics and interaction, use real placeholders when possible, and clean up some JavaScript.

- Quick Draft widget: it now uses visible `<label>` elements and a real `placeholder` attribute 
- removes the related JavaScript
- Post title:
  - keeps the "prompt" label for backwards compatibility
  - improves the JavaScript to make the "prompt" label stay visible on focus and disappear when typing, like real placeholder do
- changes the post "prompt" text from "Enter title here" to "Add title" for consistency with the Block Editor 
- cleans-up some CSS

Props Cheffheid, afercia.
Fixes #42390.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 17:39:53 +00:00
Andrea Fercia ca53eac85e Accessibility: Improve the password form buttons accessibility.
- makes the "Cancel" button always visible: this allows to generate a new password also on small screens
- moves focus back to the Generate Password button when closing the form
- changes the password reset show/hide button from a clickable `<span>` element to a real `<button>` element
- improves the CSS

Props janak007, afercia.
Fixes #42853.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-13 23:37:57 +00:00
desrosj 03240dd3f4 Docs: Correct various spelling mistakes.
Props man4toman.
Fixes #46339.
Built from https://develop.svn.wordpress.org/trunk@44894


git-svn-id: http://core.svn.wordpress.org/trunk@44725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-13 19:32:53 +00:00
Sergey Biryukov c4f8bc468d PHPCS: Fix errors introduced in [44833].
Built from https://develop.svn.wordpress.org/trunk@44858


git-svn-id: http://core.svn.wordpress.org/trunk@44690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:56:49 +00:00
Sergey Biryukov 0292de60ec Comments: Improve comment content filtering.
Built from https://develop.svn.wordpress.org/trunk@44842


git-svn-id: http://core.svn.wordpress.org/trunk@44674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:30:50 +00:00
Sergey Biryukov 2504efcf94 Formatting: Improve `rel="nofollow"` handling in comments.
Built from https://develop.svn.wordpress.org/trunk@44833


git-svn-id: http://core.svn.wordpress.org/trunk@44665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:15:50 +00:00
Andrew Ozz df681b2ee0 TinyMCE: fix editor height when loaded hidden.
Props nnikolov, azaozz.
Fixes #45461.
Built from https://develop.svn.wordpress.org/trunk@44832


git-svn-id: http://core.svn.wordpress.org/trunk@44664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 20:14:52 +00:00
Dominik Schilling 24e2829eb9 I18N: Add `$domain` argument to `translate_user_role()`.
The text domain is optional and gets passed to `translate_with_gettext_context()`.

Props johnjamesjacoby	.
Fixes #38736.
Built from https://develop.svn.wordpress.org/trunk@44830


git-svn-id: http://core.svn.wordpress.org/trunk@44662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-11 20:32:52 +00:00
desrosj 7d952a7930 General: Add missing `@since` annotation for `wp_get_direct_php_update_url()`.
Missed in [44815].

Props birgire.
See #46074.
Built from https://develop.svn.wordpress.org/trunk@44829


git-svn-id: http://core.svn.wordpress.org/trunk@44661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-11 12:59:50 +00:00
Sergey Biryukov 51c0543bf2 Bootstrap/Load: Add `nocache_headers()` to all `wp_die()` handlers.
Props spacedmonkey.
Fixes #46054.
Built from https://develop.svn.wordpress.org/trunk@44828


git-svn-id: http://core.svn.wordpress.org/trunk@44660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-11 11:47:50 +00:00
Sergey Biryukov 69939e4929 Database: Use `wp_die()` instead of `die()` in `dead_db()`, for more flexibility and consistency with other error messages in core.
Props gitlost.
Fixes #41655.
Built from https://develop.svn.wordpress.org/trunk@44827


git-svn-id: http://core.svn.wordpress.org/trunk@44659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-11 11:31:50 +00:00
Sergey Biryukov 931f8046d3 Docs: Improve wording in a comment in `wp_set_current_user()`.
Props nielsdeblaauw.
Fixes #45032.
Built from https://develop.svn.wordpress.org/trunk@44826


git-svn-id: http://core.svn.wordpress.org/trunk@44658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-11 10:57:55 +00:00
Andrea Fercia 9e67a186a5 Accessibility: Customize: Improve the widgets search and the widget Remove button.
- debounces the widgets search to avoid multiple `speak()` audible messages while typing: search results and messages are now triggered when users stop typing
- clarifies the Remove button title attribute
- removes a couple unnecessary `preventDefault()`

Props davetgreen, afercia.
Fixes #28888.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-09 12:56:54 +00:00
desrosj 26ab5fcee1 Privacy: Be less restrictive of the HTML tags allowed in user data exports.
Previously, only `a` and `br` tags were allowed in the `value` table cell for each field included in the HTML file generated when a user is exporting their personal data. Instead of relying on a hardcoded list of allowed tags, the `wp_kses()` call in `wp_privacy_generate_personal_data_export_group_html()` will now fallback to the default list of allowed tags (which includes `i`, `strong`, `em`, and other basic HTML formatting tags).

Also, a new context of `personal_data_export` will now be passed to the `wp_kses()` call. As a result, the list of HTML tags and attributes allowed in the export file can now be filtered using the `wp_kses_allowed_html` filter and checking for the `personal_data_export` context.

Fixes #44044.
Props tz-media, desrosj, pento, birgire, garrett-eclipse.
Built from https://develop.svn.wordpress.org/trunk@44824


git-svn-id: http://core.svn.wordpress.org/trunk@44656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 22:05:53 +00:00
desrosj 175f825ec8 Built/Test Tools: Add missing access modifiers to `abstract-testcase.php`.
Fixes #46384.
Props andizer.
Built from https://develop.svn.wordpress.org/trunk@44823


git-svn-id: http://core.svn.wordpress.org/trunk@44655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 20:52:54 +00:00
Boone Gorges 401d3c1b51 Taxonomy: Introduce `post_column_taxonomy_links`.
This filter allows plugin developers to modify the markup for the links
in taxonomy columns on edit.php.

Props DaveFX.
Fixes #42669.
Built from https://develop.svn.wordpress.org/trunk@44822


git-svn-id: http://core.svn.wordpress.org/trunk@44654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 15:37:52 +00:00
desrosj 2b100c8151 Privacy: Add missing header text for screen readers to privacy list tables.
In [34891], `WP_Screen` was updated with methods to store, retrieve, and render screen reader text used by screens with `WP_List_Table` instances. When the export/erase personal data list tables were introduced in [42967], these headings were missing.

Fixes #46041.
Props afercia, xkon, garrett-eclipse, desrosj.
Built from https://develop.svn.wordpress.org/trunk@44821


git-svn-id: http://core.svn.wordpress.org/trunk@44653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 15:25:51 +00:00
allancole df240768e3 Twenty Nineteen: Improve custom color behavior for InnerBlocks
Currently, if a parent block has a custom background color assigned, its child blocks will inherit the parent's text colors — even if the child block has its own custom text color assigned to it. 

This update changes the following: 

- Adjusts Twenty Nineteen's custom background color defaults to target direct children only which fixes the issue

Props kjellr.

See #46432.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 22:37:50 +00:00
desrosj a9ea1b9183 Widgets: Remove `change` event when editing a Custom HTML widget.
The `change` event was previously required to ensure that the Customizer picked detected changes to the widget’s content and synced them to the preview. In the current state, though, the `trigger( ‘change’ )` is no longer required and is causing issues with the widget’s “Done” and “Save” buttons.

Fixes #45335.
Props audrasjb, afercia, westonruter.
Built from https://develop.svn.wordpress.org/trunk@44816


git-svn-id: http://core.svn.wordpress.org/trunk@44648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 22:26:49 +00:00
desrosj ec417a34a7 General: Add a way to specify a direct link for a user to update PHP.
A direct URL to where a user can update PHP for their website can now be specified in one of two ways:

- Defining the `WP_DIRECT_UPDATE_PHP_URL` environment variable.
- Returning a URL to the `wp_direct_php_update_url` filter.

When a URL is specified, an additional “Update PHP” button will be displayed at the bottom of the Core dashboard widget informing administrators that their site is running an outdated version of PHP (see [42832]).

Fixes #46074.
Props afragen, desrosj, lukecarbis.
Built from https://develop.svn.wordpress.org/trunk@44814


git-svn-id: http://core.svn.wordpress.org/trunk@44646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 21:32:50 +00:00
Sergey Biryukov d2f9cbf7be Users: Use `login__in` parameter for `WP_User_Query` in `WP_MS_Users_List_Table::prepare_items()`, instead of a manual query.
Props spacedmonkey.
Fixes #45223.
Built from https://develop.svn.wordpress.org/trunk@44813


git-svn-id: http://core.svn.wordpress.org/trunk@44645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 12:35:52 +00:00
youknowriad c32464d7f1 Block Editor: Fix unit tests after new blocks addition.
- Regenerate the REST API fixtures.
 - Remove the block registration hooks in the unit tests.

Refs #46429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 11:54:51 +00:00
Sergey Biryukov b5542c6b1b Theme Editor: Capitalize "Think very carefully about your site crashing..." message for consistency with other strings.
Props immeet94.
Fixes #46436.
Built from https://develop.svn.wordpress.org/trunk@44811


git-svn-id: http://core.svn.wordpress.org/trunk@44643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:17:52 +00:00
youknowriad 4ff02d2b19 Block Editor: Include the missing blocks files
These were missed from the previous commit.

Refs #46429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:24:51 +00:00
Sergey Biryukov 5658305b1c Date/Time: Reduce explicit local `current_time( 'timestamp' )` usage in favor of native PHP functions.
Timestamps don't carry any timezone information, using the intended format directly simplifies the logic and makes the code less confusing.

Props Rarst, jdgrimes.
See #40657.
Built from https://develop.svn.wordpress.org/trunk@44809


git-svn-id: http://core.svn.wordpress.org/trunk@44641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:12:51 +00:00
youknowriad 2d58d57e38 Block Editor: Update the WordPress Packages from Gutenberg 5.2.
Updated Packages:

 - @wordpress/a11y@2.1.0
 - @wordpress/annotations@1.1.0
 - @wordpress/api-fetch@3.0.0
 - @wordpress/autop@2.1.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0
 - @wordpress/babel-plugin-makepot@3.0.0
 - @wordpress/babel-preset-default@4.0.0
 - @wordpress/blob@2.2.0
 - @wordpress/block-editor@1.0.0
 - @wordpress/block-library@2.3.0
 - @wordpress/block-serialization-default-parser@3.0.0
 - @wordpress/block-serialization-spec-parser@3.0.0
 - @wordpress/blocks@6.1.0
 - @wordpress/browserslist-config@2.3.0
 - @wordpress/components@7.1.0
 - @wordpress/compose@3.1.0
 - @wordpress/core-data@2.1.0
 - @wordpress/custom-templated-path-webpack-plugin@1.2.0
 - @wordpress/data@4.3.0
 - @wordpress/date@3.1.0
 - @wordpress/deprecated@2.1.0
 - @wordpress/docgen@1.0.0
 - @wordpress/dom-ready@2.1.0
 - @wordpress/dom@2.1.0
 - @wordpress/e2e-test-utils@1.0.0
 - @wordpress/e2e-tests@1.0.0
 - @wordpress/edit-post@3.2.0
 - @wordpress/editor@9.1.0
 - @wordpress/element@2.2.0
 - @wordpress/escape-html@1.1.0
 - @wordpress/eslint-plugin@2.0.0
 - @wordpress/format-library@1.3.0
 - @wordpress/hooks@2.1.0
 - @wordpress/html-entities@2.1.0
 - @wordpress/i18n@3.2.0
 - @wordpress/is-shallow-equal@1.2.0
 - @wordpress/jest-console@3.0.0
 - @wordpress/jest-preset-default@4.0.0
 - @wordpress/jest-puppeteer-axe@1.0.0
 - @wordpress/keycodes@2.1.0
 - @wordpress/library-export-default-webpack-plugin@1.1.0
 - @wordpress/list-reusable-blocks@1.2.0
 - @wordpress/notices@1.2.0
 - @wordpress/npm-package-json-lint-config@1.2.0
 - @wordpress/nux@3.1.0
 - @wordpress/plugins@2.1.0
 - @wordpress/postcss-themes@2.0.0
 - @wordpress/priority-queue@1.0.0
 - @wordpress/redux-routine@3.1.0
 - @wordpress/rich-text@3.1.0
 - @wordpress/scripts@3.0.0
 - @wordpress/shortcode@2.1.0
 - @wordpress/token-list@1.2.0
 - @wordpress/url@2.4.0
 - @wordpress/viewport@2.2.0
 - @wordpress/wordcount@2.1.0

This also includes the update to the scripts dependencies and the new widgets php files.

Props iseulde.
Fixes #46429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:09:59 +00:00
Jeremy Felt 6969fb8001 Multisite: Fix code formatting errors from r44805
See #46351.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 03:46:50 +00:00
Jeremy Felt 446f60d2d0 Multisite: Ensure `wpmu_new_blog` hook receives expected data in `$meta`.
Restores `public`, `archived`, `mature`, `spam`, `deleted`, `lang_id`, and `WPLANG` to the `$meta` data passed to `wpmu_new_blog`. This hook was deprecated in 5.1.0, but code using it still relies on this data.

Props david.binda, pbiron.
Fixes #46351.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 03:34:51 +00:00
Boone Gorges c1cc5e3153 Taxonomy: Add `level-n` classes to rows on edit-tags.php.
Props johnjamesjacoby.
Fixes #38810.
Built from https://develop.svn.wordpress.org/trunk@44804


git-svn-id: http://core.svn.wordpress.org/trunk@44636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 03:04:50 +00:00
Aaron Jorbin a08ef594ad Build: Add PHP 7.4 to the Travis build.
Travis have switched the nightly PHP version to PHP 8.0. The 7.4snapshot version is PHP 7.4.

We don't support 7.4 yet, so it's in allowed failures.

Fixes #46235.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-06 21:02:51 +00:00
Sergey Biryukov 16fd7d42e8 Menus: After [42857], apply background to the correct elements on Menus screen.
Props audrasjb, afercia, mukesh27, garrett-eclipse.
Fixes #46368.
Built from https://develop.svn.wordpress.org/trunk@44801


git-svn-id: http://core.svn.wordpress.org/trunk@44633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 21:01:49 +00:00
Sergey Biryukov 41ef077491 Networks and Sites: Check the result of `get_site()` in `wp_insert_site()`.
Props davidbinda, vanyukov, lukecarbis.
Fixes #46300.
Built from https://develop.svn.wordpress.org/trunk@44799


git-svn-id: http://core.svn.wordpress.org/trunk@44631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 20:35:52 +00:00
Sergey Biryukov 5e3ae17d61 I18N: Remove trailing spaces from translatable strings introduced in [43436].
Props dimadin.
Fixes #46277.
Built from https://develop.svn.wordpress.org/trunk@44797


git-svn-id: http://core.svn.wordpress.org/trunk@44629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 20:14:49 +00:00
Andrea Fercia 5c60995bd4 Accessibility: Replace media placeholder clickable divs with buttons.
`<button>` elements are natively interactive, supported by any assistive technology, and must be used instead of non-semantic, non-accessible `<div>` elements.

Also, this change aligns the Media Widgets and the Customizer site icon and site logo controls with the design pattern used in the new Block Editor for similar controls.

Props ramonopoly, welcher, afercia.
Fixes #43151.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 17:49:52 +00:00
Peter Wilson 4094d3687a Comments: Allow for `comment-reply.js` to be loaded in the HTML header.
Allows for themes or plugins setting the comment-reply JavaScript as a dependency of an HTML header script. This in turn causes `comment-reply.js` to be loaded early, requiring execution to be delayed.

Props pento, peterwilsoncc, jorbin for feedback.
Fixes #46280.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 01:52:51 +00:00
Andrea Fercia 9e8d0c14d3 Accessibility: Hide the Toolbar sub-menu CSS generated icons from assistive technologies.
CSS generated content is rendered for speech output. When it's not meant to be announced by assistive technologies, for example with font icons, special care should be used to hide it. At the moment, the only reliable way to do this is making use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 22:46:52 +00:00
desrosj 85d60b2d7a Privacy: Remove two test methods that fail on certain configurations.
The `test_detects_cannot_create_index()` and `tests_detects_cannot_write_html()` test methods are prone to failure under certain configurations, as discovered by the hosts reporting back the test suite results. This removes those two methods until a better approach to testing those scenarios can be created.

Partial revert of [44786].
See #44233.
Built from https://develop.svn.wordpress.org/trunk@44792


git-svn-id: http://core.svn.wordpress.org/trunk@44624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 22:20:49 +00:00
Andrea Fercia 957ad84b81 Coding standards: Fix incorrect CSS `rgba()` values.
Also, fixes some indentation where spaces were used instead of tabs.

Props nielslange, mukesh27.
Fixes #45937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 22:02:52 +00:00
desrosj 3a2a5431f1 Build/Test Tools: Fix validation error in multisite PHPUnit configuration file.
A PHPUnit configuration file with more than one `<php>` tag causes a validation error in PHPUnit versions 7.x. There are currently 2 in the `tests/phpunit/multisite.xml` file, which appears to be accidentally introduced in [29954].

Fixes #46414.
Built from https://develop.svn.wordpress.org/trunk@44790


git-svn-id: http://core.svn.wordpress.org/trunk@44622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 21:33:50 +00:00
Felix Arntz 3120fe36c9 General: Introduce `wp_is_php_version_acceptable` filter to make the check for triggering PHP version warnings stricter.
The filter is only run if the wordpress.org API considers the PHP version acceptable. This ensures that other plugins or hosting providers can only make this check stricter, but not loosen it.

Props j-falk, mikeschroder.
Fixes #46065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 21:14:50 +00:00
desrosj 9bbf751fd7 Privacy: Remove privacy feature related admin pointers.
In 4.9.6, several new privacy related features were introduced. Admin pointers were included to make administrators aware of these features. They have served their purpose and can now go silently into the night.

Props garrett-eclipse, desrosj, xkon.
Fixes #45999.
Built from https://develop.svn.wordpress.org/trunk@44787


git-svn-id: http://core.svn.wordpress.org/trunk@44619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 20:47:50 +00:00
desrosj 5b54c00f0e Privacy: Add missing unit tests for exporting personal data.
Props allendav, birgire, iandunn, desrosj, garrett-eclipse.
Fixes 44233.
Built from https://develop.svn.wordpress.org/trunk@44786


git-svn-id: http://core.svn.wordpress.org/trunk@44618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 19:36:52 +00:00
Aaron Jorbin 71cf332e65 Replace usages of basename() with wp_basename() in order to support multibyte filenames
This is focused on the pieces of code that touch media files and the tests that support them. `basename` isn't multibyte compatible out of the box. See http://php.net/basename and https://bugs.php.net/bug.php?id=62119.

See #43170.
Props Viper007Bond.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-01 20:58:52 +00:00
Sergey Biryukov e0e99fe82e Users: Revert [44780] pending test failure investigation.
See #45845.
Built from https://develop.svn.wordpress.org/trunk@44784


git-svn-id: http://core.svn.wordpress.org/trunk@44616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 22:58:50 +00:00
desrosj cb3984de47 Editor: Allow the default font size options to be removed.
Similar to `editor-color-palette`, a theme or plugin should be able to set the theme support for `editor-font-sizes` to an empty array, indicating that no additional font sizes should be available in the block’s ‘Text Settings’. The current conditional was using `empty()`, which was incorrectly causing the default font sizes to be used instead.

Props jorgefilipecosta, chrisvanpatten, SergeyBiryukov.
Fixes #46290.
Built from https://develop.svn.wordpress.org/trunk@44782


git-svn-id: http://core.svn.wordpress.org/trunk@44614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 21:44:49 +00:00
Adam Silverstein 0e5e765a1b Revisions: improve display responsiveness, especially on smaller screen sizes.
* Fix an overlap issue with the "Restore this Revision" button that made it difficult to use on phone sized devices.

Props ryan, PranaliPatel, karinedo.
Fixes #33830.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 20:11:50 +00:00
Sergey Biryukov 43324cec8b Users: Replace raw SQL query in `check_password_reset_key()` with `get_user_by()`.
Props davidbaumwald, iworks, spacedmonkey.
Fixes #45845.
Built from https://develop.svn.wordpress.org/trunk@44780


git-svn-id: http://core.svn.wordpress.org/trunk@44612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 14:39:50 +00:00
Sergey Biryukov e57fcaeeee Privacy: Escape Privacy Policy guide URL in in Privacy Policy edit page notice.
Props itowhid06, garrett-eclipse.
Fixes #44761.
Built from https://develop.svn.wordpress.org/trunk@44779


git-svn-id: http://core.svn.wordpress.org/trunk@44611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 12:08:49 +00:00
Sergey Biryukov cfc9a60243 Privacy: Improve translator comments for Privacy Policy page links in Privacy Settings; escape URLs.
Props birgire, garrett-eclipse.
Fixes #46369.
Built from https://develop.svn.wordpress.org/trunk@44778


git-svn-id: http://core.svn.wordpress.org/trunk@44610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 12:01:50 +00:00
Sergey Biryukov abf27c3b62 Privacy: Return a more accurate error message when the user cannot perform the requested action.
Props mmuhsin, jplojohn, garrett-eclipse, desrosj.
Fixes #44833.
Built from https://develop.svn.wordpress.org/trunk@44777


git-svn-id: http://core.svn.wordpress.org/trunk@44609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 11:49:51 +00:00
Sergey Biryukov c78d28d9f1 Login and Registration: Update URLs for browser cookie documentation.
Props joostdevalk.
Fixes #46254.
Built from https://develop.svn.wordpress.org/trunk@44776


git-svn-id: http://core.svn.wordpress.org/trunk@44608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 11:44:52 +00:00
Sergey Biryukov acaa0422f1 Privacy: Change "Email Data" link text on "Export Personal Data" screen to "Send Export Link" for clarity.
Previously: [43172], accidentally reverted in [43212].

Props birgire, ianbelanger.
Fixes #44822. See #43964.
Built from https://develop.svn.wordpress.org/trunk@44775


git-svn-id: http://core.svn.wordpress.org/trunk@44607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 11:37:51 +00:00
Sergey Biryukov 60c217f531 Twenty Nineteen: Remove stray `÷` character in `print.css`.
Props mukesh27, laurelfulford.
Fixes #46083.
Built from https://develop.svn.wordpress.org/trunk@44774


git-svn-id: http://core.svn.wordpress.org/trunk@44606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 02:47:51 +00:00
Sergey Biryukov f7f806b5ef Twenty Nineteen: Update `style-rtl.css` after [44657].
See #45731.
Built from https://develop.svn.wordpress.org/trunk@44773


git-svn-id: http://core.svn.wordpress.org/trunk@44605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 02:44:49 +00:00
Sergey Biryukov d68f13cbc8 Docs: Add missing `WP_Customize_Control` reference to `WP_Customize_Nav_Menu_Control` and `WP_Customize_Nav_Menu_Item_Control` DocBlocks.
Props aniketpatel.
Fixes #46077.
Built from https://develop.svn.wordpress.org/trunk@44772


git-svn-id: http://core.svn.wordpress.org/trunk@44604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 02:07:51 +00:00
Sergey Biryukov f0a9df1aa2 Twenty Nineteen: Avoid nested comment author links in `TwentyNineteen_Walker_Comment::html5_comment()`.
Props iamdmitrymayorov, mukesh27.
Fixes #46291.
Built from https://develop.svn.wordpress.org/trunk@44771


git-svn-id: http://core.svn.wordpress.org/trunk@44603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 01:55:50 +00:00
desrosj e37950c0dc Help/About: Fix mismatched opening/closing tags.
The 5.1 About page contains some invalid HTML markup.

Props bulletdigital.
Fixes #46319.
Built from https://develop.svn.wordpress.org/trunk@44769


git-svn-id: http://core.svn.wordpress.org/trunk@44601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-26 15:39:55 +00:00
desrosj 67e811c15e Build: Minify images
After `grunt-contrib-imagemin` was upgraded in WordPress 5.0, the `grunt precommit:image` task results in further minifications to `loading.gif`.

Fixes #46295.
Built from https://develop.svn.wordpress.org/trunk@44768


git-svn-id: http://core.svn.wordpress.org/trunk@44600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-25 15:21:52 +00:00
Andrea Fercia adc7f9fe54 Accessibility: Improve the image and gallery widgets preview accessibility.
In an authoring context, the image `alt` attribute purpose is different from the one for the front end. For example, screen reader users need to know what the selected image is, even when the original `alt` value is empty.

This change introduces a new pattern for the `alt` text in an authoring context:
- uses the `alt` text if not empty
- when there's no `alt` text, informs users the image has no alternative text and provides a reference to the image filename

Also, makes the gallery media widget preview an unordered list to make screen readers announce the number of images automatically.

Fixes #43137.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-23 18:32:53 +00:00
Aaron Jorbin 029fcf7791 Script Loader: Load fakejshint as jshint due to "good and evil".
Originally fixed in [42547]. Broken in [44163]. We've been here before. I recognize that tree.

Fixes #46299

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


git-svn-id: http://core.svn.wordpress.org/trunk@44594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-21 21:19:50 +00:00
Gary Pendergast 3825e94d43 Upgrades: Update `$_old_files` for WordPress 5.1.
`wp-includes/random_compat/random_bytes_openssl.php` was removed in [43130], this commit updates `$_old_files` to match.

Fixes #46284.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-21 04:35:50 +00:00
Andrea Fercia 6fe48278ea Accessibility: Comments: Improve links and buttons semantics and interaction.
With the exception of the "Edit" link, the "row actions" controls in the Comments table behave differently depending if JavaScript support is on or off.
When JavaScript support is off, they behave like links. When JavaScript support is on, they behave like buttons and they need to be buttons or have an ARIA `role="button"` added via JavaScript.

Lastly, the buttons in the Reply/Quick Edit form and the "Add Comment" in the edit post page meta box need to be buttons.

Fixes #43412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 23:37:50 +00:00
Andrea Fercia 2cbb1bd95e Accessibility: General Settings: Update custom date/time format previews while typing.
The custom date/time format previews in General Settings were updated only when blurring the related input fields. With this change, they're now updated when users finish typing a custom format, properly debouncing the `input` event callback.

Props dilipbheda, Girishpanchal.
Fixes #43364.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 22:56:50 +00:00
Andrea Fercia 7f977760a1 Accessibility: Improve buttons placement in the Comments Quick edit/Reply form.
Proximity of related information is an inclusive design principle that benefits everyone and it's particularly important for users with reduced visual field, low vision, or other vision or cognitive impairments. User interface controls that are logically grouped should be placed close to each other.
Also, this change makes the buttons visual order and the DOM order match.

Fixes #45972.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 22:09:50 +00:00
Andrea Fercia 34b3b388fd Accessibility: Remove unnecessary fieldset and legend elements from the User Profile page.
Also fixes a CSS margin issue in the mobile view.

Props punit5658.
Fixes #46093.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 19:03:51 +00:00
Boone Gorges b44877f0da Taxonomy: Remove `@ignore` annotation on `_get_term_hierarchy()`.
Originally introduced in [32453], the `@ignore` annotation caused the
function to be improperly ignored by the Code Reference parser.

The `@access private` annotation is the correct way to mark a
function for internal use only.

Props coffee2code.
Fixes #45997.
Built from https://develop.svn.wordpress.org/trunk@44755


git-svn-id: http://core.svn.wordpress.org/trunk@44587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-19 20:24:50 +00:00
Gary Pendergast a7ef0feac0 Admin: Update the About page design to match mockups.
This commit also moves the images to s.w.org, removes the old "Gutenberg has been deactivated" warning, as well as removing some old JS from About pages of years gone past.

Props melchoyce, ryelle, paaljoachim, karmatosed, pento.
Fixes #46161.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-19 01:57:52 +00:00
Peter Wilson 1b2f7d862c Comments: Fix backward compatibility regressions in comment reply JavaScript.
Adds a `MutationObserver` to `comment-reply.js` to allow for lazy-loaded comments to continue working without the need to re-initialize the comment form.

Props Pento.
Fixes #46260.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-18 04:27:50 +00:00
Gary Pendergast 82859e2641 Accessibility: Fix a regression in the old media modal pagination links.
[43019] improved the table pagination link styling, but introduced a regression in the old media dialog.

Props afercia, joneiseman.
Fixes #41858.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-17 22:24:52 +00:00
Peter Wilson 97cb237548 Trunk is now 5.2-alpha.
Update package.json missed in [44742].


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


git-svn-id: http://core.svn.wordpress.org/trunk@44578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-14 00:54:51 +00:00
Peter Wilson 408908979c Build: Fix formatting issues introduced in [44740].
See #46218.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-14 00:42:48 +00:00
Peter Wilson 2317cd8398 Trunk is now 5.2-alpha.
Built from https://develop.svn.wordpress.org/trunk@44742


git-svn-id: http://core.svn.wordpress.org/trunk@44574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-14 00:13:50 +00:00
Peter Wilson a51ca641ec Build: Remove source map from `jquery.form.min.js`.
Minimize jquery.form.js as part of build process to remove the source map reference. 

Modify source map tests to include all JavaScript files rather than testing Backbone and jQuery only.

Props pento.
Fixes #46218.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-14 00:07:49 +00:00
laurelfulford fd8a3db97b Twenty Nineteen: Update the quote block styles.
Update the theme's quote block border styles, so they will work better with the updated styles for the quote block, coming in Gutenberg 5.2.

Props @kjellr.
Fixes #46239.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-13 18:40:49 +00:00
Dominik Schilling dc8e9c6de0 Upgrade/Install: Update character count for the `$table_prefix` config line after [43650] and [42343].
Fixes #46220.
Built from https://develop.svn.wordpress.org/trunk@44738


git-svn-id: http://core.svn.wordpress.org/trunk@44570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-12 16:52:53 +00:00
Gary Pendergast 0fa4a52255 Post WordPress 5.1 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@44737


git-svn-id: http://core.svn.wordpress.org/trunk@44569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 02:23:49 +00:00
Gary Pendergast 3d4a251a0e WordPress 5.1 RC1.
Built from https://develop.svn.wordpress.org/trunk@44736


git-svn-id: http://core.svn.wordpress.org/trunk@44568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 02:14:48 +00:00
Peter Wilson 729c8e875f Admin: Improve logic of PHP version check on about page.
Props noisysocks, peterwilsoncc.
See #46161.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 01:53:51 +00:00
Gary Pendergast e24bf1c278 Admin: Fix code formatting issues in the About page.
See #46161.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 01:28:50 +00:00
Gary Pendergast 7370de8023 Admin: Initial version of the WordPress 5.1 About page.
This includes the final strings, the design will continue to iterate.

Props mcsf, noisysocks, melchoyce, azaozz, afragen, JeffPaul, peterwilsoncc, andreamiddleton.
See #46161.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 01:25:51 +00:00
Peter Wilson c4505be534 Install/upgrade: Remove Gutenberg plugin deactivation from upgrade process.
The Gutenberg plugin will not be deactivated on sites upgrading to WordPress 5.1. This deprecates the `upgrade_500_was_gutenberg_active` option and the `upgrade_500()` function as they are no longer required.

Props peterwilsoncc.
Fixes #46029.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 00:16:50 +00:00
Gary Pendergast cddee8b72e Formatting: Loosen the type checking in `_sanitize_text_fields()`.
[44618] added strict type checking to `_sanitize_text_fields()`, which has caused some compat issues with plugins.

We can loosen the type checking to only reject objects and arrays, and cast other types to string.

Props Nick_theGeek, pento.
Fixes #41450.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 23:35:49 +00:00
laurelfulford a1eceec5bd Default Themes: Bump the version numbers and release dates.
Update the theme versions and release dates for the default themes, in time for WordPress 5.1.

The POT files for Twenty Eleven and Twenty Ten have also been updated.

Fixes #46070.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 23:23:50 +00:00
youknowriad a89b6c042d Block Editor: Update WordPress Packages to solve PHP 5.2.2 parser incompatibility.
Updated:

 - @wordpress/block-library@2.2.16
 - @wordpress/block-serialization-default-parser@2.0.5
 - @wordpress/blocks@6.0.7
 - @wordpress/edit-post@3.1.11
 - @wordpress/editor@9.0.11
 - @wordpress/format-library@1.2.14

Props pento.
Fixes #46200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 09:02:49 +00:00
Gary Pendergast 95d5aa0e97 Build: Update `package.json` dependencies to match Gutenberg.
Props wpscholar, azaozz, gziolo.
Fixes #46039.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 06:28:03 +00:00
Gary Pendergast c2c021baf1 Multisite: After creating a new blog, ensure the blog cache is correctly cleaned up.
Props david.binda, spacedmonkey.
Fixes #46125.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 06:04:51 +00:00
Gary Pendergast bbbf0ee62e Admin: Re-add some validation from [44048] that was accidentally removed in [44165].
Props david.binda.
See #45037.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 04:12:51 +00:00
desrosj 2d1d80f4c5 Themes: Revert returning the value of `locate_template()` in functions that call it.
Because the names of the `get_header()`, `get_footer()`, `get_sidebar()`, and `get_template_part()` functions indicate that a value is returned, some plugins and themes already have `echo get_template_part()` in their codebase. Adding a return value to these functions using the approach in [44678] will cause the two unintended side effects of unexpected content being sent to the browser, and accidental path disclosure.

Reverts [44678].

Props davidbinda.
See #40969.
Built from https://develop.svn.wordpress.org/trunk@44725


git-svn-id: http://core.svn.wordpress.org/trunk@44556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-06 18:37:51 +00:00
Andrew Ozz 5b6a1ad3b2 TinyMCE: fix color of highlighted drop-down menu items in Classic Block.
Fixes #46164.
Built from https://develop.svn.wordpress.org/trunk@44724


git-svn-id: http://core.svn.wordpress.org/trunk@44555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-05 17:47:55 +00:00
Sergey Biryukov ee8c3deaa5 Build/Test Tools: Display a message about currently supported PHPUnit branch to avoid fatal errors on later versions.
See #46149.
Built from https://develop.svn.wordpress.org/trunk@44723


git-svn-id: http://core.svn.wordpress.org/trunk@44554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-03 22:41:53 +00:00
Peter Wilson f5cab6780f Administration: Save column visibility on small screens.
Modifies the jQuery selector for determining hidden columns to ensure they are detected when the expanded columns details are closed.

Adds high-specificity selectors specifically for setting screen options in the comments and plugins lists.

Props afercia.
Fixes #46005. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@44553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-01 02:14:51 +00:00
Gary Pendergast 60ddb6012e Post WordPress 5.1 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@44721


git-svn-id: http://core.svn.wordpress.org/trunk@44552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-31 03:32:51 +00:00
Gary Pendergast 60d36c140a WordPress 5.1 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@44720


git-svn-id: http://core.svn.wordpress.org/trunk@44551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-31 03:17:51 +00:00
Sergey Biryukov 61a7dc1277 Build/Test Tools: Move `WP_UnitTestCase_Base::assertPostConditions()` to a more appropriate place.
See #43218.
Built from https://develop.svn.wordpress.org/trunk@44719


git-svn-id: http://core.svn.wordpress.org/trunk@44550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 14:31:51 +00:00
Andrew Ozz 02adaaf90c TinyMCE: fix external references in `wpview` and `wpemoji` plugins in the Classic Block instance when running from `/build`.
Fixes #46147.
Built from https://develop.svn.wordpress.org/trunk@44718


git-svn-id: http://core.svn.wordpress.org/trunk@44549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 14:12:52 +00:00
Felix Arntz 92c3c46abe Bootstrap/Load: Revert fatal error recovery mechanism from 5.1 to polish for 5.2.
Due to the high number of follow-up tickets and associated security concerns, it was decided to reschedule the fatal error recovery feature for WordPress 5.2, in order to address these issues properly. The feature will continue to be developed, with iterations being merged into trunk early in the 5.2 release cycle.

Fixes #46141. See #44458, #45932, #45940, #46038, #46047, #46068.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 11:01:52 +00:00
Andrew Ozz 6a5df4271f TinyMCE: update alternative icon fonts for older browsers after [44713].
See #46094.
Built from https://develop.svn.wordpress.org/trunk@44716


git-svn-id: http://core.svn.wordpress.org/trunk@44547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 10:07:50 +00:00
Sergey Biryukov 32ee2ed573 Build/Test Tools: Simplify `WP_PHPUnit_Util_Getopt` and update documentation.
Introduced in [918/tests] and updated in [26871], the class is there to make sure that known bugs are not skipped when `phpunit` is called with a `--group` that corresponds to an `@ticket` annotation (such as `phpunit --group 12345`).

Enforcing recognized arguments or correctly formed arguments is not the concern here, so reusing `PHPUnit_Util_Getopt::parseLongOption()` was superfluous.

See #43218.
Built from https://develop.svn.wordpress.org/trunk@44715


git-svn-id: http://core.svn.wordpress.org/trunk@44546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 00:54:51 +00:00
Peter Wilson d9a1f99d9c Customize: Remove `wp_targeted_link_rel` pre-save filter from change-sets.
The pre-save filters added to links in [43732] could invalidate JSON data when saving Customizer change-sets.

This removes the filters when saving and publishing change-sets.

Props peterwilsoncc, nikeo for testing.
See #45292.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 21:29:50 +00:00
Ella Iseulde Van Dorpe 2ce767141a TinyMCE: Update to 4.9.2
https://github.com/tinymce/tinymce-dist/compare/4.8.0...4.9.2

Fixes #46094.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 20:19:51 +00:00
Andrea Fercia da75c0cdb6 Comments: Restore a removed fieldset legend after [44466].
In the Edit Comment page:
- moves the "Author" `h2` heading out of the form fieldset
- removes an unnecessary `<span>` element
- adds a visually hidden legend element to the fieldset
- uses an existing string "Comment Author"

Fixes #43586.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 19:10:49 +00:00
youknowriad 3c7a623f85 Block Editor: Update WordPress Packages to the latest versions.
Updated Packages:

 - @wordpress/annotations@1.0.8
 - @wordpress/block-library@2.2.15
 - @wordpress/components@7.0.8
 - @wordpress/edit-post@3.1.10
 - @wordpress/editor@9.0.10
 - @wordpress/format-library@1.2.13
 - @wordpress/list-reusable-blocks@1.1.21
 - @wordpress/nux@3.0.9
 - @wordpress/rich-text@3.0.7

Fixes list block indentation and Crowdsignal embed block.

Props iseulde.
Fixes #46137.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 18:23:55 +00:00
Gary Pendergast 129db19a29 Tests: Fix the tests for the `c` and `r` formats in `date_i18n()`.
To test the `date_i18n()` output correctly, the tests added in [43434] need to set a non-UTC timezone.

Props Rarst.
Fixes #20973.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 01:20:50 +00:00
Dominik Schilling 8af55f1578 Script Loader: Add missing semicolon.
Fixes #46131.
Built from https://develop.svn.wordpress.org/trunk@44709


git-svn-id: http://core.svn.wordpress.org/trunk@44540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 21:59:49 +00:00
Dominik Schilling 9531bd8378 Privacy: Use `label_count` property of post status for request counts in the list table views.
See #44952.
Fixes #46112.
Built from https://develop.svn.wordpress.org/trunk@44708


git-svn-id: http://core.svn.wordpress.org/trunk@44539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 21:55:51 +00:00
Sergey Biryukov 503e533f6d Build/Test Tools: Don't throw an exception for unrecognized options in `WP_PHPUnit_Util_Getopt::parseLongOption()`.
The method is only used for two known options: `group` and `exclude-group`, others should be passed to PHPUnit.

Props johnbillion.
See #43218.
Built from https://develop.svn.wordpress.org/trunk@44707


git-svn-id: http://core.svn.wordpress.org/trunk@44538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 18:50:53 +00:00
Felix Arntz e7e87ca545 Bootstrap/Load: Fix notice when theme directories are not populated yet.
When a fatal error occurs outside of a regular plugin in a stage where theme directories are not set up yet (for example in a MU plugin), this would previously trigger a notice.

Props johnbillion.
Fixes #46068. See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 17:43:51 +00:00
Sergey Biryukov c0339fc3da Coding Standards: Replace spaced indentation sections of `phpunit.xml.dist`, `multisite.xml`, and `build.xml` with tabs.
Props netweb, desrosj.
See #43218.
Built from https://develop.svn.wordpress.org/trunk@44705


git-svn-id: http://core.svn.wordpress.org/trunk@44536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 17:21:48 +00:00
Sergey Biryukov 3803d8bb60 Build/Test Tools: Reorder `<file>` and `<exclude>` rules in `multisite.xml` to avoid warnings in PHPUnit 7.2+.
Missed in [44702].

See #43218.
Built from https://develop.svn.wordpress.org/trunk@44704


git-svn-id: http://core.svn.wordpress.org/trunk@44535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 17:20:50 +00:00
Sergey Biryukov 28674e5e39 Build/Test Tools: Correct `WP_Test_REST_Schema_Sanitization::test_type_string()` to check for both `1.1` float and `'1.10'` string explicitly.
Previously, the test only passed due to a bug in PHPUnit 7.1.x and older versions.

Fixes #43218. See #38586.
Built from https://develop.svn.wordpress.org/trunk@44703


git-svn-id: http://core.svn.wordpress.org/trunk@44534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 16:54:50 +00:00
Sergey Biryukov 1353355216 Build/Test Tools: Reorder `<file>` and `<exclude>` rules in `phpunit.xml.dist` to avoid warnings in PHPUnit 7.2+.
Remove deprecated `logIncompleteSkipped` option that does not exist in PHPUnit 6.0+.

See #43218.
Built from https://develop.svn.wordpress.org/trunk@44702


git-svn-id: http://core.svn.wordpress.org/trunk@44533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 15:55:50 +00:00
Sergey Biryukov 74468758dd Build/Test Tools: Add support for PHPUnit 7.x.
* Create an abstract `WP_UnitTestCase_Base` class to share between PHPUnit 7.x and older versions.
* Add a speed-trap loader to determine which `SpeedTrapListener` class needs to be loaded for the current PHPUnit version.
* Remove unnecessary `PHPUnit\Util\Test` and `PHPUnit_Util_Getopt` inheritances.
* Update Travis CI config to use PHPUnit 7.x for PHP 7.1, 7.2, and nightly PHP versions.

Props jipmoors, netweb, desrosj, ayeshrajans, soulseekah, SergeyBiryukov.
See #43218.
Built from https://develop.svn.wordpress.org/trunk@44701


git-svn-id: http://core.svn.wordpress.org/trunk@44532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 14:11:51 +00:00
Dominik Schilling fb552cad0f Install/Upgrade: After [44451], update translator comments to include the new placeholder.
See #46111.
Fixes #45574.
Built from https://develop.svn.wordpress.org/trunk@44700


git-svn-id: http://core.svn.wordpress.org/trunk@44531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-27 14:46:55 +00:00
Dominik Schilling 05a3c91d34 TinyMCE Classic Block: Remove unused variable.
See #46071.
Built from https://develop.svn.wordpress.org/trunk@44699


git-svn-id: http://core.svn.wordpress.org/trunk@44530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-26 12:59:49 +00:00
Dominik Schilling fe73f310d4 REST API: Prevent translating the hook name in a `_doing_it_wrong()` message by using a placeholder.
See #45265.
Built from https://develop.svn.wordpress.org/trunk@44698


git-svn-id: http://core.svn.wordpress.org/trunk@44529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-26 12:29:54 +00:00
Andrew Ozz c31e8cf756 TinyMCE Classic Block: fix repositioning of the inline toolbar on scrolling.
Props iseulde, azaozz.
Fixes #46062.
Built from https://develop.svn.wordpress.org/trunk@44697


git-svn-id: http://core.svn.wordpress.org/trunk@44528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-24 11:24:50 +00:00
Andrew Ozz a6e8abca83 TinyMCE Classic Block: fix the Advanced Link modal (accessible when clicking on the cogwheel in the inline link modal in a Classic Block).
Fixes #46071.
Built from https://develop.svn.wordpress.org/trunk@44696


git-svn-id: http://core.svn.wordpress.org/trunk@44527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-24 11:21:50 +00:00
Andrew Ozz 6bd203bb50 TinyMCE Classic Block: fix the Edit Image modal to work as in the Classic Editor.
Fixes #46085.
Built from https://develop.svn.wordpress.org/trunk@44695


git-svn-id: http://core.svn.wordpress.org/trunk@44526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-24 11:11:51 +00:00
Peter Wilson 2a19ad39db Docs: Correct documentation for the `schedule_event` filter.
The filter runs for both recurring and single events.

See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-23 23:23:52 +00:00
Peter Wilson 6f337d1195 Cron: Move logic for finding the next event's timestamp.
Moves the logic for determining when an event will next run from `wp_next_scheduled()` to `wp_get_scheduled_event()`.

This improves the performance of `wp_get_scheduled_event()` by avoiding duplicate function calls and object cache hits.

Props peterwilsoncc.
Fixes #45976.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-23 23:08:51 +00:00
Peter Wilson cccba7e224 Plugins: Update docs for individual plugin loaded actions.
Corrects documentation to indicate the full path is passed to each action.

Fixes #41346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-23 03:39:51 +00:00
Peter Wilson 24e8467c6f Formatting: Prevent `wp_targeted_link_rel()` adding an empty attribute.
Bypass adding a `rel` attribute when the `wp_targeted_link_rel` filter returns an empty string or other falsy result.

Props mcmwebsol, spartank, meatman89fs.
Fixes #45352.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-22 21:55:51 +00:00
Felix Arntz c204ac4bc7 Bootstrap/Load: Fix fatal error when passing a `WP_Error` to `wp_die()`.
This was introduced in [44466]. Also, this changeset adds tests for `_wp_die_process_input()` so that this never happens again.

Props dd32.
See #45933.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-22 08:52:50 +00:00
Gary Pendergast cb25284b2f Post WordPress 5.1 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@44689


git-svn-id: http://core.svn.wordpress.org/trunk@44520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-22 00:57:50 +00:00
Gary Pendergast a10a37c6d7 WordPress 5.1 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@44688


git-svn-id: http://core.svn.wordpress.org/trunk@44519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-22 00:39:49 +00:00
Gary Pendergast 7d17b53ff2 Blocks: Define the `edit_posts` capability on the `wp_block` post type.
Meta capability mapping doesn't recurse through multiple meta definitions, which creates a situation where the capabilities test is looking for the non-existent primitive capability `edit_blocks`, which should instead be mapped to `edit_posts`.

Defining the `edit_posts` capability when the `wp_block` post type is registered causes this check to change to to the `edit_posts` capability.

Props aduth.
Fixes #45373.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-22 00:05:52 +00:00
Gary Pendergast af73067eb5 Menus: Fix a deprecated call to `get_terms()`.
The taxonomy should be passed as part of `$args`, rather than as its own argument.

Props birgire.
Fixes #45297.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 23:38:52 +00:00
Gary Pendergast 2d6bf285d4 Menus: Show an appropriate message when no menus exist.
Props garrett-eclipse.
Fixes #45155.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 23:32:51 +00:00
Gary Pendergast faf1528d8f Customiser: Prevent JS errors when previewing pages with an `<area>` tag.
The customiser assumes that `<area>` tags will have a `href` attribute, which isn't necessarily true. Now it checks instead of assuming.

Props janthiel, adamsilverstein.
Fixes #45053.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 23:03:50 +00:00
Gary Pendergast 64877e74e8 Comments: Default the `show_comments_cookies_opt_in` checkbox to enabled.
This also updates the option label, to clarify that it needs to be enabled for comment cookies to work.

Props azaozz, pento, dhavalkasvala, desrosj, pputzer, mirkoschubert, ThemeZee.
Fixes #44736.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:57:52 +00:00
John Blackbourn 63a2dc94c6 Bootstrap/Load: Update the `@since` entry for `wp_die()`.
See #46038

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


git-svn-id: http://core.svn.wordpress.org/trunk@44513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:52:51 +00:00
Gary Pendergast 71e3633f3f Comments: Update the message shown when a comment is awaiting moderation.
If the commenter doesn't have cookies set, they won't see the comment preview again. Showing an expanded message will help offset any confusion if they revisit the site later, and their comment is still in moderation, but they can't see it anymore.

Props azaozz, pento.
Fixes #44736.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:46:49 +00:00
Gary Pendergast 445209c9eb Menus: Remove error styling when the user addresses the error.
An error is triggered if a Menu Name isn't given when the user attempts to create a menu. When they go back and add a name, the error styling can be removed.

Props ashokrd2013, piyush9100, welcher, afercia.
Fixes #42321.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:10:49 +00:00
laurelfulford b9e6b7e2a3 Twenty Seventeen: Update blockquote alignment on load.
The theme uses JavaScript to check if a right-aligned blockquote is below the sidebar content before pushing it outside of the content area. This was originally only firing on browser resize.

Fixes #40103.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:08:49 +00:00
Gary Pendergast 57c293e2d7 Themes: Return the value of `locate_template()` in functions that call it.
The `get_header()`, `get_footer()`, `get_sidebar()`, and `get_template_part()` functions all call `locate_template()` as their final action, which returns the name of the template being loaded. Returning this value helps handle problems with templates being loaded.

Props tferry.
Fixes #40969.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:00:50 +00:00
Gary Pendergast d289b00dc6 Media: Add a `$real_mime` parameter to the `wp_check_filetype_and_ext` filter.
This allows more accurate filtering of the filename and extension given to uploaded files.

Props desrosj, Tkama.
Fixes #45707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 21:52:50 +00:00
Dominik Schilling 7d9f962521 I18N: Enable `clear_destination` in upgrader for updating/installing language packs.
Introduces `Language_Pack_Upgrader::clear_destination()` to clear existing translations before installing new translations. Ensures that unused translations in JSON format are cleaned up.

Props dd32, swissspidy, ocean90.
Fixes #45468.
Built from https://develop.svn.wordpress.org/trunk@44676


git-svn-id: http://core.svn.wordpress.org/trunk@44507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 21:13:48 +00:00
Dominik Schilling 1c0849c2b2 I18N: Remove JSON translations when deleting a theme or a plugin.
See #29860.
Fixes #45467.
Built from https://develop.svn.wordpress.org/trunk@44675


git-svn-id: http://core.svn.wordpress.org/trunk@44506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 20:41:50 +00:00
Felix Arntz 7daa39eb1d Bootstrap/Load: Change `shutdown handler` naming to final `fatal error handler` and allow disabling the handler entirely via a constant.
The `WP_Shutdown_Handler` name plus related function names were premature when originally committed, as there can be multiple shutdown handlers in PHP, and WordPress makes use of that feature. This changeset modifies the name to a more appropriate `WP_Fatal_Error_Handler`, and related to that changes the following names:

* The drop-in to override the handler is now called `fatal-error-handler.php`.
* The internal function `wp_register_premature_shutdown_handler` is now called `wp_register_fatal_error_handler()`.

In addition to these naming changes, a new constant `WP_DISABLE_FATAL_ERROR_HANDLER` is introduced that can be set in `wp-config.php` to entirely disable the fatal error handler. That constant's value is and should be accessed indirectly via a new `wp_is_fatal_error_handler_enabled()` function and is filterable via a new `wp_fatal_error_handler_enabled` hook. Note that disabling the fatal error handler will skip the new functionality entirely, including the potentially used `fatal-error-handler.php` drop-in.

The new set of constant, filter and function provide for an easier-to-use mechanism to disable the fatal error handler altogether, rather than requiring developers to implement a drop-in for purely that purpose.

Props afragen, flixos90, joyously, knutsp, markjaquith, ocean90, schlessera, spacedmonkey.
Fixes #46047. See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 20:15:50 +00:00
Felix Arntz 3b7a01f1f2 Bootstrap/Load: Fix bug causing AJAX functions to return a 500 when passing a `null` response to `wp_die()`.
This bug was introduced in [44497].

Props ocean90.
See #45933.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 20:07:49 +00:00
Sergey Biryukov 933c1fd23b PHPCS: Fix formatting issues introduced in [44670].
See #44914.
Built from https://develop.svn.wordpress.org/trunk@44672


git-svn-id: http://core.svn.wordpress.org/trunk@44503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 19:57:51 +00:00
Felix Arntz 6645578424 Bootstrap/Load: Ensure that the fatal error shutdown handler does not prevent other shutdown handlers from being called.
This changeset adds support for a new `wp_die()` argument `exit`, which defaults to true and determines whether `wp_die()` should actually terminate the request. The new fatal error handler then calls `wp_die()` with that argument set to false, as calling `die()` or `exit` from a PHP shutdown function prevents other shutdown functions from being called.

Props schlessera, johnbillion.
Fixes #46038. See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 19:10:52 +00:00
Sergey Biryukov e992ae3ea2 Post Formats: Prevent Bulk Edit from unintentionally changing post format to Standard even if set to "No change".
Correct the logic in [41187].

Props birgire, mukesh27, lanche86.
Fixes #44914. See #41396.
Built from https://develop.svn.wordpress.org/trunk@44670


git-svn-id: http://core.svn.wordpress.org/trunk@44501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 18:05:50 +00:00
laurelfulford 5c86facd5d Twenty Seventeen: Prevent YouTube videos from being cut off in Safari.
The theme's `object-fit: cover` styles for the header caused YouTube videos to be positioned too far left in Safari. 

Fixes #40522.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 18:03:51 +00:00
desrosj eaa03c3c8c Privacy: Include request counts inline with the filters in the list table views.
Fixes $44952
Props eArtboard, pratikkry, birgire, garrett-eclipse.
Built from https://develop.svn.wordpress.org/trunk@44668


git-svn-id: http://core.svn.wordpress.org/trunk@44499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 17:35:51 +00:00
Sergey Biryukov f93ccded3f Docs: Correct type and description for the first parameter of `set-screen-option` filter.
Props pbiron, burhandodhy.
Fixes #44850.
Built from https://develop.svn.wordpress.org/trunk@44667


git-svn-id: http://core.svn.wordpress.org/trunk@44498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 16:08:51 +00:00
Felix Arntz 1698c8adea Bootstrap/Load: Support `WP_Error` and `$args` passed to `wp_die()` consistently in all handlers.
Prior to this change, each `wp_die()` handler had their own logic for how to parse arguments, causing inconsistencies and even breakage because the arguments possible to pass to `wp_die()` depended on the request context. Passing a `WP_Error` as `$message` for example used to be only support by the default handler, but not the AJAX and XML-RPC handlers.

With the fatal error protection, plus the new `wp_die()` handlers related to that, improving this support and compatibility has become more significant. Therefore this changeset introduces a private `_wp_die_process_input()` function that handles all function parameters consistently.

Props spacedmonkey, flixos90, schlessera.
Fixes #45933. See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 16:02:50 +00:00
Sergey Biryukov a57ead3d94 I18N: Update translator comment for the notice displayed when viewing the block editor with JavaScript disabled.
A URL in the comment creates an impression that the link is not translatable.

See #45453, #45856.
Built from https://develop.svn.wordpress.org/trunk@44665


git-svn-id: http://core.svn.wordpress.org/trunk@44496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 13:54:54 +00:00
Gary Pendergast c5647f61bb Dev Tools: Load the `wp-admin` build instructions from `src`.
This de-duplicates the content, so it only needs to be modified in one place.

Additionally, we now link to the NPM/Grunt install guides on the build instructions page.

Props pento, ocean90.
Fixes #43732.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 05:00:49 +00:00
Gary Pendergast 2b4f8ff69e Terms: Show error colours when a term fails to update.
Props birgire, afercia, jaymanpandya.
Fixes #43703.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 04:50:50 +00:00
Peter Wilson 54d43d88ea Options: Avoid unnecessary DB calls when updating network options.
Adds a `maybe_serialize()` comparison for the old and new values in `update_network_option()` to avoid unnecessary database writes when options contain identical objects.

Props bor0.
Fixes #44956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 04:27:51 +00:00
Gary Pendergast 989a28b482 Widgets: Fix Gallery Widget preview after an image is deleted.
The Gallery Widget incorrectly tried to include the deleted image in the preview.

Props westonruter, janak007, afercia, mrasharirfan.
Fixes #43139.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 04:13:51 +00:00
Gary Pendergast c0debca1f3 Docs: Improve the docblocks for `wp_insert_post()` and `wp_set_post_categories()`.
Their respective `post_category` and `post_categories` parameters were not correct.

Props Takahashi_Fumiki.
Fixes #45171.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 01:45:50 +00:00
Gary Pendergast 4c425c87fa Comments: Show the "awaiting moderation" message when comment cookies are disabled.
The "Your comment is awaiting moderation." message relied upon the comment author cookie being set. However, since it's now possible to opt-out of that cookie, submitting a comment won't show the comment preview when the comment is placed in moderation.

To avoid this issue, we now include a hash in the redirect URL, allowing the site to identify that a preview of the moderated comment should be displayed.

Props imath, tomdxw, birgire, lakenh, azaozz, pento.
Fixes #43857.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 01:34:51 +00:00
Gary Pendergast 36a0e107f0 Tests: Add tests for the `__return*()` functions.
Props pbearne, mukesh27.
Fixes #46043.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 00:33:51 +00:00
laurelfulford 3993b8cda2 Twenty Nineteen: Create separate `:lang()` selectors for Devanagari.
In the non-latin font fallback styles, languages using the Devanagari alphabet were initially committed in a comma-separated list in the `:lang()` selector, which isn't fully supported. This update separates those languages into their own `:lang()` selectors. 

Props mako09.
Fixes #45731.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-20 20:23:51 +00:00
Felix Arntz 9f2d529a77 Upgrade/Install: Make `version_compare()` calls for plugin required version checks more robust.
Props afragen.
Fixes #46024. See #43986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-20 12:03:53 +00:00
Andrea Fercia 5e6e3573bf Build/Test Tools: Update QUnit index file after [43174].
Updates the last occurrence of "(opens in a new window)" to "(opens in a new tab)".

See #43803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 15:28:50 +00:00
Andrew Ozz fc781d2f8a TinyMCE: fix `$_old_files` after [44651], remove `wp-tinymce.js` and add `wp-tinymce.js.gz`.
Props ocean90, garrett-eclipse.
Fixes #45645.
Built from https://develop.svn.wordpress.org/trunk@44654


git-svn-id: http://core.svn.wordpress.org/trunk@44485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 10:23:50 +00:00
Mike Schroder 792d02dde0 Media: Port date filter width fix from Gutenberg.
Ensures the entire date selection dropdown shows in the media modal.

Previously this was worked around in 8deaf5eca6 in Gutenberg. This moves the rule to core, allowing the workaround to be removed in Gutenberg.

Props ianbelanger.
Fixes #44760.
See https://github.com/WordPress/gutenberg/issues/2202
Built from https://develop.svn.wordpress.org/trunk@44653


git-svn-id: http://core.svn.wordpress.org/trunk@44484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 01:20:49 +00:00
laurelfulford fc83cdfe6c Twenty Nineteen: Fix alignment of page title when there are no posts.
Fix the alignment of the "Nothing Found" page title when there are no posts, to match how it appears for the search results when nothing is found, and the 404 page. 

Props kjellr, lorenzone92.
Fixes #45887.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 20:46:51 +00:00
Andrew Ozz b7897c5761 TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
Fixes #45645.
Built from https://develop.svn.wordpress.org/trunk@44651


git-svn-id: http://core.svn.wordpress.org/trunk@44482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 19:51:53 +00:00
laurelfulford f8d655fe37 Twenty Nineteen: Use a less aggressive approach for non-latin font fallbacks.
The theme's original approach to its non-latin font fallbacks required `!important`, which overrode fonts that shouldn't have been changed, like the icon fonts used for editor buttons.

Props kjellr, mako09, allancole.
Fixes #45731.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 18:38:50 +00:00
Andrew Ozz abcb59f860 TinyMCE: treat HTML comments same as tags when keeping cursor position. Fixes breaking the More and Nextpage tags when switching from Text to Visual.
Props iCaleb, jeremeylduvall.
Fixes #45947.
Built from https://develop.svn.wordpress.org/trunk@44649


git-svn-id: http://core.svn.wordpress.org/trunk@44480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 16:33:51 +00:00
Gary Pendergast 9fc53b8461 Block Editor: Restore the Custom Fields display option.
When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.

Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.

Props dd32, pento.
Fixes #46028.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 05:26:49 +00:00
Gary Pendergast ac79b4e716 Coding Standards: Remove some `add_action()`s that were commented out years ago.
Props Girishpanchal.
Fixes #44545.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 04:04:49 +00:00
Gary Pendergast 9b2a6b606c Plugin Installer: Ensure CSS for the 3-column view isn't applied to the 4-column view.
Props nielslange.
Fixes #43573.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 04:03:52 +00:00
Gary Pendergast a06dd65235 Build Tools: Upgrade WPCS to 2.0.0.
A few sniffs have been renamed, this change includes the relevant `phpcs:ignore` comment updates.

Fixes #46002.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 02:15:49 +00:00
Gary Pendergast 0ee053758e Emoji: Upgrade Twemoji to 11.2.0.
This upgrade includes general improvements to the style of a variety of emoji.

Full changelog: https://github.com/twitter/twemoji/compare/v11.0.0...v11.2.0

Props desrosj, pento.
Fixes #45133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:42:50 +00:00
Gary Pendergast 6ef9017c96 Docs: Add missing periods to a grab-bag of docblocks.
Props Hitendra Chopda.
Fixes #45409.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:03:50 +00:00
desrosj 2a92fc794b Tests: Do not include the delimiter parameter in `ucwords()` calls.
This parameter is not supported in PHP < 5.4. Introduced in [44641].

See #44672.
Built from https://develop.svn.wordpress.org/trunk@44642


git-svn-id: http://core.svn.wordpress.org/trunk@44473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 21:45:51 +00:00
desrosj 56bb62543d REST API: Allow a user to change the letter casing of their email.
When a `PUT` request is performed to update a user, a `rest_user_invalid_email` error is incorrectly being returned when the email exists with different letter casing, even if it belongs to the user being updated. `email_exists()` performs a case insensitive lookup, but the conditional statement following that lookup was performing a strict comparison between the new email and the user’s current email.

This changes that comparison to instead compare the user ID returned by `email_exists()` with the user ID being updated. This more closely matches the logic used in `edit_user()` and allows a user to change the letter casing of their email.

Props fuchsws, rachelbaker, desrosj.
Fixes #44672.
Built from https://develop.svn.wordpress.org/trunk@44641


git-svn-id: http://core.svn.wordpress.org/trunk@44472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 21:25:51 +00:00
Andrea Fercia a32aeb0392 Media: Improve unselecting media in the media bulk selection mode.
Disables the "Delete Selected" button when unselecting media by clicking the
"checkmark" box in the media bulk selection mode.

Props subrataemfluence, adamsilverstein.
Fixes #42239.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 12:08:49 +00:00
Andrea Fercia 3578f89900 Accessibility: Improve the way Internet Explorer 11 and JAWS announce fieldset legends.
When Internet Explorer encounters a non interactive element with a `tabindex`
attribute, it adds the element to the accessibility tree with a `role=group` and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.

- removes `tabindex="0"` from the content and the toolbar containers: these tabindex attributes are no longer needed
- removes `aria-label="Main content"` from the content container: not needed
- keeps the media modal focus fallback introduced in [38142] by making the `#wpbody-content` element focusable only when needed

Props stevefaulkner, aardrian.
Fixes #43154.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 11:55:51 +00:00
Gary Pendergast e96ea8eab6 Docs: Partial revert of [44636].
Unrelated changes in `wp-includes/general-template.php` were accidentally committed.

See #44502.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:57:52 +00:00
Andrea Fercia 173e0f9ee7 Administration: CSS coding standards
- properties should be followed by a colon and a space
- media queries shouldn't use spaces within parenthesis
- indentation should use tabs instead of spaces or mixed spaces / tabs
- the content property should use double quotes
- no double spaces

Props nadim0988, afercia.
Fixes #45185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:41:52 +00:00
Gary Pendergast e42dddb5ba Docs: Mark the internal functions as `@private` in `wp-includes/post.php`.
Props shamim51.
Fixes #44502.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:21:51 +00:00
Gary Pendergast dcdfd7f412 Docs: Fix the last handful of incorrect `@since 5.0.0` docblock tags.
Props peterwilsoncc.
Fixes #45543.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
Gary Pendergast 3f847f8b6c Media: `media_handle_sideload()` expectes `wp_insert_attachment()` to return a `WP_Error`.
For `wp_insert_attachment()` to do that, we need to be setting the `$wp_error` parameter to true.

Props subrataemfluence, jirihon.
Fixes #44303.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:27:50 +00:00
Gary Pendergast e933db7053 Tests: Ensure meta keys are cleaned up after each test.
Props jnylen0.
Fixes #46007.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 04:34:50 +00:00
Gary Pendergast 09ab58c3d2 Build Tools: Uglify `underscore.min.js` while building.
This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.

Props pento, laghee.
Fixes #44560.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 04:24:49 +00:00
Gary Pendergast 3fc76e352b Comments: Correct the "Mine" comment count when viewing comments for a particular post.
The count should only be comments made on that post by the current user, not all comments by them.

Props chetan200891, garrett-eclipse.
Fixes #46014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 02:45:49 +00:00
Gary Pendergast b158c806d1 Coding Standards: Remove an assignment in a conditional from `get_plugins()`.
Props subrataemfluence.
Fixes #44249.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 00:49:48 +00:00
desrosj 67bec96f92 Privacy: Improve the ’Copy’ button verbiage to provide more clarity.
On the Privacy Policy Guide, there is currently a ‘Copy’ button below each section of suggested text. It is unclear what copy means without more context. It could be assumed, for instance, that the suggested text is copied to a new page.

This changes the button text to read `Copy this section to clipboard` to more clearly inform the user what is copied and how.

Props JoshuaWold, garrett-eclipse, birgire, vishaldodiya.
Fixes #44677.
Built from https://develop.svn.wordpress.org/trunk@44629


git-svn-id: http://core.svn.wordpress.org/trunk@44460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 22:45:50 +00:00
desrosj 3baecf04ee Privacy: Allow column sorting in the privacy request admin tables.
This allows users to sort the export and erase personal data request tables by “Requester” (`post_title`, or user email) and “Requested” (`post_date`, or when the request was created), which can be helpful when sites have many requests present.

Props birgire, ianbelanger, pbiron, desrosj.
Fixes #43405.
Built from https://develop.svn.wordpress.org/trunk@44628


git-svn-id: http://core.svn.wordpress.org/trunk@44459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:52:49 +00:00
Felix Arntz 94fb16f03f Plugins: Use centralized API to display information about updating PHP when a plugin requires a higher version.
This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new `wp_update_php_annotation()` function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.

Furthermore, this changeset adds missing `update_php` capability checks before displaying the information about updating PHP.

Props afragen.
Fixes #45986. See #43986, #45686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:07:00 +00:00
desrosj 601d13a657 Coding Standards: Manually fix coding standards violations in `wp-signup.php`.
Props GaryJ, jrf, netweb, desrosj.
Fixes #43405.
Built from https://develop.svn.wordpress.org/trunk@44626


git-svn-id: http://core.svn.wordpress.org/trunk@44457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 16:51:52 +00:00
Felix Arntz 2e7e09d869 Bootstrap/Load: Add support for JSON requests to `wp_die()`.
In addition to AJAX and XML-RPC requests, `wp_die()` now handles JSON requests correctly, returning information in the expected content type.

Props spacedmonkey.
See #45933, #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 15:22:56 +00:00
Felix Arntz 30d5ca9172 Bootstrap/Load: Fix workaround to display admin link in PHP error template by introducing `$link_url` and `$link_text` arguments to `wp_die()`.
This changeset removes the hack that was used before to display more complex HTML markup than a simple message in the default PHP error template via `wp_die()`. By removing HTML markup from the arguments passed to `wp_die()` it furthermore paves the way for supporting other content types than the default.

The message and arguments can be modified with new `wp_php_error_message` and `wp_php_error_args` filters respectively.

Furthermore this changeset fixes a few issues of functions not existing which could potentially have caused fatal errors when executed early in the WordPress bootstrap process.

Props flixos90, spacedmonkey.
See #45933, #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 15:21:50 +00:00
Felix Arntz 225f3055b8 Bootstrap/Load: Only pause extensions when they cause a crash on a protected endpoint.
This is a first step on pausing extensions less aggressively. If a plugin or theme only causes a crash in the frontend, there is no point in pausing it in the admin backend.

See #45940, #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 14:05:00 +00:00
Felix Arntz a6ec40d65d Bootstrap/Load: Use `wp_load_translations_early()` when Translation API is not yet loaded.
Props spacedmonkey.
Fixes #45932. See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 13:34:52 +00:00
Andrea Fercia da760d1ecf Taxonomy: Remove extra padding around buttons on term edit page.
Props monikarao, mukesh27, chetan200891.
See #9777.
Fixes #45183.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 12:59:52 +00:00
Gary Pendergast 077af6e47d Docs: Improve the `sanitize_email` filter.
- Remove duplicate parameter names.
- Fix the wrong value being passed in the second parameter.
- Correct the type of the `$message` parameter.

Props ChriCo.
Fixes #45595.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:16:49 +00:00
Gary Pendergast 8c702e04f3 Rewrite: Remove extra arguments being passed to `WP_Rewrite::iis7_url_rewrite_rules()`.
Props rafsuntaskin.
Fixes #44185.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:10:50 +00:00
Gary Pendergast 0bbb277ee4 Formatting: Add type checking to `_sanitize_text_fields()`.
When a non-string value is passed, return an empty string.

Props Mte90.
Fixes #41450.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:05:49 +00:00
Gary Pendergast 63cbfcbded Plugin Editor: Disable the documentation look up button when no function is selected.
Props xkon.
Fixes #41143.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:01:50 +00:00
Gary Pendergast 32ace06a39 Templates: Fix the return value of `get_the_author_posts_link()`.
When the `$authordata` global isn't defined, return an empty string, rather than `void`.

Props mukesh27, subrataemfluence.
Fixes #45597.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:54:49 +00:00
Gary Pendergast 4fa5437fc1 Admin: Use `is_user_logged_in()` instead of `wp_validate_auth_cookie()` in `admin-post.php`.
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered.

Props jmdodd.
Fixes #45475.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:41:50 +00:00
Gary Pendergast 5ed802faf4 Docs: Correct the docs for `POMO_Reader::setEndian()`.
The parameter type and name where the wrong way around.

Props ishitaka.
Fixes #45410.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:36:48 +00:00
Gary Pendergast 19642fd0c9 Docs: Correct the `@return` type of `get_theme_mod()`.
This now matches the type of the `$value` parameter of `set_theme_mod()`.

Props mensmaximus.
Fixes #45319.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:32:48 +00:00
Gary Pendergast 97aef0e336 Docs: Remove duplicate docblocks for the `pre_user_login` and `link_category` filters.
Props coffee2code.
Fixes #45308.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:29:49 +00:00
Gary Pendergast 655d44ffe8 Users: Add extra checking to `wp_new_user_notification()`.
Prevent a notification from being sent when an unrecognised value is passed in the `$notify` parameter.

Props cthreelabs, 360zen.
Fixes #44293.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 04:27:50 +00:00
Gary Pendergast dd9442ae6c Posts: Set a HTTP 403 error when an incorrect post preview nonce is sent.
Props graymouser.
Fixes #43570.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 03:54:50 +00:00
Gary Pendergast 6f723ddf50 Docs: Add documentation for the `wp_maybe_auto_update` action.
Props MikeGillihan.
Fixes #43301.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 03:38:49 +00:00
Gary Pendergast f2d2126d0d Admin Bar: Set the Admin Bar to not be showing on REST API requests.
Props ayeshrajans.
Fixes #45727.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 02:54:50 +00:00
desrosj 4bb472ac32 Docs: Add missing documentation for `_WP_Dependency::set_translations()`.
Introduced in [43859].

Props stazdotio.
Fixes #45550.
Built from https://develop.svn.wordpress.org/trunk@44607


git-svn-id: http://core.svn.wordpress.org/trunk@44438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 22:48:51 +00:00
desrosj 50ddffbac3 Privacy: Use consistent variable naming when working with privacy requests.
Throughout the core privacy functions, `WP_User_Request` instances were stored in variables named both `$request`, and `$request_data`. This changes all occurrences of `$request_data` to `$request` for better consistency.

Props nateallen, bruceallen, garrett-eclipse.
Fixes #44708.
Built from https://develop.svn.wordpress.org/trunk@44606


git-svn-id: http://core.svn.wordpress.org/trunk@44437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 22:35:52 +00:00
Gary Pendergast c062e39ac8 Docs: Tweak the docblock for `setup_userdata()`.
This is a followup to [44603]. The default value should be last, not somewhere in the middle.

Props swissspidy.
Fixes #44697.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 10:29:50 +00:00
Andrea Fercia f76f57e8ab Admin: Use the correct CSS media query for the Help tab on small screens after [44588].
See #43221

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


git-svn-id: http://core.svn.wordpress.org/trunk@44435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 07:48:50 +00:00
Gary Pendergast e0c4e5b610 Users: Correct the default value in `setup_userdata()`.
The `$for_user_id` parameter is an `int`, not a `string`, so the default value should be `0`, rather than an empty string.

Props subrataemfluence.
Fixes #44697.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:33:50 +00:00
Gary Pendergast 8ddef3e98d Users: Check that a valid user is passed to `get_password_reset_key()`.
Props edocev.
Fixes #44601.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:27:49 +00:00
Gary Pendergast a5d8a6bde3 Docs: Fix the `WP_Object_Cache::get()` docblock.
The `$force` parameter is a `bool`, not a `string`. The matching `wp_cache_get()` docblock has the correct type.

Props subrataemfluence.
Fixes #44454.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:18:51 +00:00
Gary Pendergast 656d8edcaf Docs: Add docblocks for `WP_Customize_Header_Image_Control` member variables.
Props subrataemfluence.
Fixes #44410.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:54:48 +00:00
Gary Pendergast e4b25f1be2 Build Tools: Don't send AppVeyor notifications on Slack on repeated successful builds.
See #44276.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:49:49 +00:00
Gary Pendergast 883ee72ed6 Coding Standards: Move an assignment out of a condition in `wp-admin/admin.php`.
Props subrataemfluence, jrf, pento.
Fixes #44363.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:48:50 +00:00
Gary Pendergast 120710d8f8 Coding Standards: Move assignments out of conditions in `wp-includes/user.php`.
Props subrataemfluence.
See #44315.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:38:49 +00:00
Gary Pendergast db696999f1 Updates: Tweak the "before updating, please back up..." message.
Props chetan200891, sebastien@thivinfo.com.
See #43790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:20:50 +00:00
Gary Pendergast 4de7979b25 Build Tools: Tweak AppVeyor settings.
- Set `grunt build` as the build script
- Disable testing and deployment options
- Customise the Slack integration message
- Only show the Slack message when the status changes

See #44276.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 04:51:52 +00:00
Gary Pendergast c009a1960a Build Tools: Add AppVeyor integration.
AppVeyor allows us to test in a Windows environment. This first iteration tests that building works correctly.

Props netweb.
Fixes #44276.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 04:21:50 +00:00
desrosj 59fbee8544 Coding Standards: Assignments must be the first block of code on a line.
Props subrataemfluence.
Fixes #44225.
Built from https://develop.svn.wordpress.org/trunk@44593


git-svn-id: http://core.svn.wordpress.org/trunk@44424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:41:50 +00:00
desrosj 34c4ce3c81 Docs: Update inaccurate `return` descriptions.
In the `@return` tag description for `get_post_modified_time()`, `get_the_time()`, and `get_post_time()`, the `$d` parameter is incorrectly referred to as `$id`.

Props behzod.
Fixes #45323.
Built from https://develop.svn.wordpress.org/trunk@44592


git-svn-id: http://core.svn.wordpress.org/trunk@44423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:08:49 +00:00
Gary Pendergast bf43978730 Link Template: In `get_adjacent_post()`, move the sanitisation of `$excluded_terms` earlier.
This is a followup to [42828], ensuring that the `get_{$adjacent}_post_excluded_terms` filter is always passed an array, as expected.

Props soulseekah, zottto.
Fixes #43521.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 01:54:49 +00:00
Gary Pendergast 6073c6e209 Docs: Update the `@since` version for the `doing_it_wrong_trigger_error` filter.
Fixes #34183.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:52:50 +00:00
Gary Pendergast 2f288c306c Widgets: Remove unnecessary `sanitize_text_field()` calls in core widget `::form()` methods.
This sanitisation only needs to be run in `::update()` to correctly clean up the input.

Props welcher, greenshady.
Fixes #42461.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:43:49 +00:00
Gary Pendergast 11e9c98d5b Admin: Make the Help tab available on small screens.
Props jobthomas, xkon.
Fixes #43221.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:20:50 +00:00
Gary Pendergast d2695fe283 Query: Cache the result when `get_pages()` doesn't find anything in the database.
Props flixos90, soulseekah.
Fixes #43514.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:27:50 +00:00
Gary Pendergast 56e77d8928 Docs: Improve the docblock of `wp_admin_bar_edit_menu()`.
What age were you when you learned that there's a `$user_id` global, as well as `$user_ID` global? I was today years old.

Props pento, mukesh27.
Fixes #43448.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:12:50 +00:00
Gary Pendergast 767fb99e94 Docs: Improve documentation of the ``$wp_registered_sidebars` global.
Props mukesh27.
Fixes #43448.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:01:49 +00:00
desrosj a7d0293446 Tests: Add missing `parent::tearDown()`.
Also, remove a `tearDown()` method that was not serving any purpose.

Fixes #45931.
Built from https://develop.svn.wordpress.org/trunk@44584


git-svn-id: http://core.svn.wordpress.org/trunk@44415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 21:34:55 +00:00
Gary Pendergast 51f4314441 Customizer: Use the `sandbox` attribute to prevent top navigation from the preview.
Props valchovski.
Fixes #42341.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:25:50 +00:00
Gary Pendergast b083cc65aa Customizer: Fix a coding standards issue introduced in [44580].
See #40020.



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


git-svn-id: http://core.svn.wordpress.org/trunk@44413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:23:50 +00:00
Gary Pendergast 0390ddad6b Docs: Improve docblocks for `_get_plugin_data_markup_translate()` and `_sort_uname_callback()`.
Props Jaydeep Rami.
Fixes #42228.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:54:49 +00:00
Gary Pendergast d8f4a04232 Customizer: Improve browser compatibility of the preview iframe.
When `home` and `siteurl` are different, the customizer preview iframe will be blank in Chrome and Safari, due to their `X-Frame-Options` implementation quirks.

Changing this to `SAMEORIGIN` and adding the `frame-ancestors` Content Security Policy gives the correct behaviour.

Props fullyint.
Fixes #40020.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:38:51 +00:00
Gary Pendergast 10c66fb426 Formatting: Remove soft hyphens when sanitising titles.
Props andg.
Fixes #45378.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:39:51 +00:00
Gary Pendergast fcd66d09d9 Widgets: Don't log invalid HTML in the Text Widget.
[41215] supresses these irrelevant error messages from the front end, this removes them from the error log, too.

Props jeherve.
Fixes #43815.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:05:48 +00:00
Gary Pendergast 5ed789dc63 Tests: Add missing `parent::setUp()` calls to all test classes.
Props johnbillion, birgire.
Fixes #37375.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 04:54:50 +00:00
Gary Pendergast 0bbfe3b8e2 Blocks: Add a `$source_block` parameter to the `render_block_data` filter.
This contains a copy of the block, unmodified by other filter functions, so that plugins have a clean reference to work from, if they need.

Props dmsnell.
Fixes #45451.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 01:47:51 +00:00
Andrea Fercia 1c59f76953 Accessibility: Exclude the Windows High Contrast mode transparent outline from the CSS transition after [44544].
See #41286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 15:01:49 +00:00
Gary Pendergast 7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Gary Pendergast 8656a65e1e Coding Standards: Fix and whitelist variable names.
From the `WordPress.NamingConventions.ValidVariableName` sniff, this commit fixes/whitelists all `NotSnakeCaseMemberVar`, `MemberNotSnakeCase`, and `StringNotSnakeCase` violations. It also fixes a handful of the `NotSnakeCase` violations.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:06:48 +00:00
Gary Pendergast 3a697f7f46 Coding Standards: Remove an unnecessary line whitelisting.
Props jrf.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:53:51 +00:00
Gary Pendergast f72594974f Coding Standards: Exclude some external files.
- `class-wp-block-parser.php` and `wp-includes/blocks/*` are imported from the Gutenberg plugin.
- `speed-trap-listener.php` is a third party library.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:01:50 +00:00
Gary Pendergast 57fcb7d8dd Coding Standards: Fix an incorrect `phpcs:ignore` comment.
It's `phpcs:ignore`, not `wpcs:ignore`.

Props GaryJ.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:49:49 +00:00
Gary Pendergast 08e8270a48 Coding Standards: Extract `extract()` from the codebase.
Of the last four instances of `extract()` occurring, three of them are removed by this commit, and the fourth is appropriately documented.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:20:48 +00:00
desrosj 2785313bf2 REST API: Encourage proper usage of `register_rest_route()`.
Calling `register_rest_route()` too early in the loading process has the potential to cause some unintentional problems and pitfalls. Because `register_rest_route()` calls `rest_get_server()` (which creates the `WP_REST_Server` instance), calling the function directly and/or before `rest_api_init` should be discouraged.

For example, if `register_rest_route ()` is called on `init`, the REST API server instance is set up (and all functions added to `rest_api_init` and other related hooks are invoked), even though the current request may not be a REST request. Also, if `register_rest_route()` is called even earlier (say, in an `mu-plugin` file), required endpoints may be missing since normal plugins have not yet been loaded and have not had a chance to register their own action hooks.

This adds a `_doing_it_wrong()` notice the first time `register_rest_route()` is called before `rest_api_init` in a request to encourage best practices for registering REST API routes.

Props kraftbj, desrosj, timothyblynjacobs.
Fixes #45265.
Built from https://develop.svn.wordpress.org/trunk@44568


git-svn-id: http://core.svn.wordpress.org/trunk@44399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 18:19:49 +00:00
Andrea Fercia 298ef1992e Menus: Make menu items not jump while dragging items.
Props alexvorn2, welcher, afercia.
Fixes #41160.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 13:56:49 +00:00
Gary Pendergast 4f861b9548 Coding Standards: Fix the `Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace` violations.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:40:50 +00:00
Gary Pendergast 6d5cd6842a Coding Standards: Document intentional `case` block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:26:50 +00:00
Gary Pendergast c00229969a Coding Standards: Add exceptions for `WordPress.Files.FileName.NotHyphenatedLowercase`.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:17:50 +00:00
Gary Pendergast 3cbd512161 Coding Standards: Ignore the violations of `Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase`.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:08:50 +00:00
Gary Pendergast c008959e9e Coding Standards: Fix the minor `WordPress.WP.I18n` violations.
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:04:49 +00:00
Gary Pendergast e05b19d248 Coding Standards: `template.php` isn't a template tag file.
`WordPress.Files.FileName.InvalidTemplateTagFileName` shouldn't apply to it.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 05:00:50 +00:00
Gary Pendergast 9e87cb7fa2 Coding Standards: Ignore the single WordPress.PHP.RestrictedPHPFunctions.create_function_create_function violation.
This is intentional, for older PHP support.

See #45934.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:45:48 +00:00
Gary Pendergast 5afa0c9ee3 Coding Standards: Remove PHPCS 2.x `@codingStandardsIgnore*` ignore syntax.
Props netweb.
Fixes #42808.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:04:51 +00:00
Gary Pendergast 3c0c01f348 Post WordPress 5.1 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@44558


git-svn-id: http://core.svn.wordpress.org/trunk@44389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:59:50 +00:00
Gary Pendergast e11b64ddba WordPress 5.1 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@44557


git-svn-id: http://core.svn.wordpress.org/trunk@44388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:42:48 +00:00
Gary Pendergast 8e623691c0 Emoji: Fix a code formatting error introduced in [44554].
See #45930.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:40:49 +00:00
Gary Pendergast 203d686ec9 Blocks: Reverse the logic when checking the `pre_render_block` result.
We should be returning if the result isn't null, not when it is.

See #45451.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:31:50 +00:00
Gary Pendergast 92146fe52b Emoji: Improve performance when encoding or staticizing emoji.
Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version check when deciding how to apply their behaviour, but this check only needs to happen once, rather than every time in their internal looks.

Moving the check outside of the loop reduces processing time by 50%.

Props johnbillion.
Fixes #45930.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:20:52 +00:00
Gary Pendergast 8e2f6a9923 Blocks: Add the `pre_render_block` and `render_block_data` filters.
At the start of `render_block()`, the `pre_render_block` filter allows the function to be short-circuited, and the `render_block_data` filter is applied to the `$block` parameter before it's processed.

Props kkarpieszuk, pento.
Fixes #45451.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:16:50 +00:00
desrosj b98affb210 Embeds: Remove Photobucket, FunnyOrDie from the list of oEmbed providers.
These services no longer support oEmbed.

Props skostadinov, notnownikki.
Fixes #45399.
Built from https://develop.svn.wordpress.org/trunk@44552


git-svn-id: http://core.svn.wordpress.org/trunk@44383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:42:51 +00:00
Andrea Fercia 9a9b5699fd Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:30:49 +00:00
desrosj d11928bc65 Docs: Add missing periods to `param` annotations for `flip()` in `WP_Image_Editor_GD`.
Props hitendra-chopda.
Fixes #45208.
Built from https://develop.svn.wordpress.org/trunk@44550


git-svn-id: http://core.svn.wordpress.org/trunk@44381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:10:50 +00:00
Andrea Fercia 64bbbda39e Accessibility: Improve color contrast ratio in the Events and News dashboard widget.
Props boemedia, lucagrandicelli.
Fixes #45280.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:08:49 +00:00
desrosj 3dcc536b80 Media: Correct `since` annotation for adding the `caption_id` attribute.
Introduced in [42704]
Fixes #34595.
Built from https://develop.svn.wordpress.org/trunk@44548


git-svn-id: http://core.svn.wordpress.org/trunk@44379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:37:49 +00:00
Felix Arntz be54938eef General: Fix existing coding standard violations in bookmark tests, as outlined in [44546].
See #43977.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:17:51 +00:00
Felix Arntz a71d208785 General: Fix problematic string to array parsing.
WordPress has historically often used code like `preg_split( '/[\s,]+/', $var )` to parse a string of comma-separated values into an array. However, this approach was causing an empty string to not be parsed into an empty array as expected, but rather into an array with the empty string as its sole element.

This was among other areas causing problems in the REST API where passing an empty request parameter could cause that request to fail because, instead of it being ignored, that parameter would be compared against the valid values for it, which typically do not include an empty string.

Props david.binda, sstoqnov.
Fixes #43977.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:06:49 +00:00
Andrea Fercia 0b5beabd36 Accessibility: Remove negative tabindex from the login, install, and setup pages header.
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 17:21:52 +00:00
Andrea Fercia 7481337591 Accessibility: Add focus styles for Windows High Contrast mode.
Introduces in core new focus styles dedicated to Windows High Contrast mode. The 
new styles use a transparent CSS outline as already explored in the Block Editor.
This first part covers some of the main user interface controls like buttons, links,
and media views elements. Other parts will be addressed in the next future.

Fixes #41286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:47:50 +00:00
Andrea Fercia c40ae024cd Accessibility: Improve the way Safari and VoiceOver read out the screen reader text.
Sometimes, Safari and VoiceOver read out the text hidden with `screen-reader-text`
in a wrong order. While there's no known, full, solution, it is possible to make 
them respect the correct order reliably at least within buttons.

Fixes #42006.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:31:49 +00:00
desrosj ae5c195d57 Media: Introduce the `has_post_thumbnail` filter.
Props rzen, desrosj.
Fixes #44859.
Built from https://develop.svn.wordpress.org/trunk@44542


git-svn-id: http://core.svn.wordpress.org/trunk@44373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 15:28:50 +00:00
Felix Arntz f251342de7 I18n: Add missing translator comments in `wp-admin/includes/class-wp-plugins-list-table.php`.
Fixes #45898.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 10:46:53 +00:00
desrosj ca36ed433b Docs: Correct `since` annotation for `_wp_get_allowed_postdata()`.
This function was introduced in 5.0.1, not 4.9.9 as currently indicated. Introduced in [44047].
Built from https://develop.svn.wordpress.org/trunk@44540


git-svn-id: http://core.svn.wordpress.org/trunk@44371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 03:31:49 +00:00
Gary Pendergast 2772e5ec06 Admin: Don't use the `keyup` event in addition to the `input` event.
The `keyup` event was used to provide support for IE8, where which doesn't support the `input` event. As we dropped IE8 support some time ago, this was simply adding unnecessary complexity and double-event triggers.

Props dlh, afercia.
Fixes #32882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:57:50 +00:00
desrosj 8eb90ac374 Docs: Restore `output` annotation in `tags-suggest.js`.
This was mistakenly removed in [44537].

See #38922.
Built from https://develop.svn.wordpress.org/trunk@44538


git-svn-id: http://core.svn.wordpress.org/trunk@44369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:50:51 +00:00
desrosj 6fbf4ceaea REST API: Restore use of `wp_ajax_ajax_tag_search()` for tag search.
This solution does not work with custom taxonomies in the current state.

Reverts [42614,42619,42737].

Props danielbachhuber.
See #38922.
Built from https://develop.svn.wordpress.org/trunk@44537


git-svn-id: http://core.svn.wordpress.org/trunk@44368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:37:51 +00:00
Gary Pendergast 8441700842 Tests: Add support for a `WP_TESTS_SKIP_INSTALL` environment variable.
Defining `WP_TESTS_SKIP_INSTALL=1` when running tests will skip the install step. While this shouldn't be used for full test runs, it's useful for saving time when running small groups of tests.

Props soulseekah.
Fixes #43432.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:19:50 +00:00
desrosj 7855451267 Privacy: Add unit tests for privacy erasure fulfillment notifications.
Adds appropriate unit tests for `_wp_privacy_send_erasure_fulfillment_notification()`.

Props birgire, desrosj.
Fixes #44234.
Built from https://develop.svn.wordpress.org/trunk@44535


git-svn-id: http://core.svn.wordpress.org/trunk@44366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:07:49 +00:00
Gary Pendergast c219081ce7 Build/Tests: Allow running unit tests from `src`.
This is a partial recommit of [44509]: it allows running unit tests from `src` (which is useful), but doesn't make it the default (which Travis is having issues with).

See #45863.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:04:50 +00:00
Gary Pendergast 14c44ad703 Block Editor: Upgrade the `@wordpress/` packages.
This brings the block editor in core up to date with the Gutenberg 4.8 plugin release.

Props aduth, gziolo, youknowriad, mkaz, jorgefilipecosta, swissspidy, iseulde, soean, noisysocks, joen, brentswisher, dekervit, dimadin, zebulan, johnny5, nosolosw, netweb, ryelle, etoledom, mzorz, desrosj, mmtr86, tinkerbelly, ocean90, earnjam, ajitbohra, talldanwp, notnownikki, mcsf, afercia, adamsilverstein, gutendev, naoki0h, miyauchi, aldavigdis.
Fixes #45885.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:54:56 +00:00
desrosj da77cad30f PHPCS: Fix formatting issues.
Fixes formatting issues introduced in [44528].

See #42017.
Built from https://develop.svn.wordpress.org/trunk@44532


git-svn-id: http://core.svn.wordpress.org/trunk@44363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:52:52 +00:00
desrosj 72098048c6 Docs: Update `since` annotation for `text-transform` support in `safecss_filter_attr()`.
Introduced in [42880].

Fixes #42729.
Built from https://develop.svn.wordpress.org/trunk@44531


git-svn-id: http://core.svn.wordpress.org/trunk@44362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:43:49 +00:00
desrosj d83d8e1154 Docs: Update `since` annotation for `comments_list_table_query_args`.
Introduced in [42420].

Fixes #42997.
Built from https://develop.svn.wordpress.org/trunk@44530


git-svn-id: http://core.svn.wordpress.org/trunk@44361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:40:51 +00:00
Gary Pendergast e69c1039eb Build Tools: Copy unminified JS files to `src`.
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.

Fixes #45869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:39:50 +00:00
desrosj 13c66b1b18 Media: Store audio creation date in meta.
In [41746], `wp_get_media_creation_timestamp()` was introduced to read the created timestamp for videos from `getID3` in meta whenever possible. This information is useful separately from the dates on the file itself.

This adds the same support audio files by utilizing `wp_get_media_creation_timestamp()` in `wp_read_audio_metadata()`.

Props blob folio, desrosj.
Fixes #42017.
Built from https://develop.svn.wordpress.org/trunk@44528


git-svn-id: http://core.svn.wordpress.org/trunk@44359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:32:50 +00:00
desrosj cf1e3b0c40 Docs: Update `since` annotations `WP_Error::has_errors()`
Introduced in [42761].

Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@44527


git-svn-id: http://core.svn.wordpress.org/trunk@44358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 22:42:51 +00:00
Felix Arntz 5bb4a5aa0e Upgrade/Install: Add missing call to clear site meta cache in `populate_site_meta()`.
See #44896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 21:29:50 +00:00
Felix Arntz 83603991c6 Bootstrap/Load: Fix missing object argument for singular capability checks and support capability tests overlooked in [44524].
See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:44:50 +00:00
Felix Arntz 1e4088fc98 Bootstrap/Load: Introduce fatal error recovery mechanism allowing users to still log in to their admin dashboard.
This changeset introduces a `WP_Shutdown_Handler` class that detects fatal errors and which extension (plugin or theme) causes them. Such an error is then recorded, and an error message is displayed. Subsequently, in certain protected areas, for example the admin, the broken extension will be paused, ensuring that the website is still usable in the respective area. The major benefit is that this mechanism allows site owners to still log in to their website, to fix the problem by either disabling the extension or solving the bug and then resuming the extension.

Extensions are only paused in certain designated areas. The frontend for example stays unaffected, as it is impossible to know what pausing the extension would cause to be missing, so it might be preferrable to clearly see that the website is temporarily not accessible instead.

The fatal error recovery is especially important in scope of encouraging the switch to a maintained PHP version, as not necessarily every WordPress extension is compatible with all PHP versions. If problems occur now, non-technical site owners that do not have immediate access to the codebase are not locked out of their site and can at least temporarily solve the problem quickly.

Websites that have custom requirements in that regard can implement their own shutdown handler by adding a `shutdown-handler.php` drop-in that returns the handler instance to use, which must be based on a class that inherits `WP_Shutdown_Handler`. That handler will then be used in place of the default one.

Websites that would like to modify specifically the error template displayed in the frontend can add a `php-error.php` drop-in that works similarly to the existing `db-error.php` drop-in.

Props afragen, bradleyt, flixos90, ocean90, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:05:49 +00:00
Boone Gorges 811be4779e Taxonomy: Update `@since` annotations for `meta_box_sanitize_cb` arg.
Introduced in [42211].

Fixes #36514.
Built from https://develop.svn.wordpress.org/trunk@44519


git-svn-id: http://core.svn.wordpress.org/trunk@44350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 15:11:48 +00:00
desrosj 04dff0e2a9 Docs: Update `since` annotations for adding `LIKE` comparisons with meta keys.
Previously introduced in [42768].

Fixes #42409.
Built from https://develop.svn.wordpress.org/trunk@44518


git-svn-id: http://core.svn.wordpress.org/trunk@44349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 14:55:49 +00:00
Pascal Birchler 1224ebd0ac Build/Test Tools: Update `.gitignore` to exclude `twentynineteen` and `twentysixteen`.
Brings the list of bundled themes in `.gitignore` up to date.

Fixes #45474.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 13:45:49 +00:00
Pascal Birchler 9bcdc25145 Build/Test Tools: Fix coding standards issues after [44515] and [44514].
See #44494, #43743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:37:49 +00:00
Pascal Birchler 8f5e0ae06c Taxonomy: Display term list table in full width if there is no edit form.
Makes sure there is no empty space when a user can manage terms but lacks the capability to edit terms.

Props mathieuhays, marcwieland95.
Fixes #43743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:05:50 +00:00
Pascal Birchler a595f8a525 I18N: Add option to hide en_US locale in `wp_dropdown_languages()`.
Props danieltj for initial patch.
Fixes #44494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:46:50 +00:00
Pascal Birchler d32d061a5e Upgrade/Install: Prevent possible JavaScript error when updating translations.
Props Presskopp.
Fixes #39189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:26:50 +00:00
Gary Pendergast f57b25f447 Tests: Revert [44509].
This commit causes Travis to fail.

See #45863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:14:51 +00:00
Pascal Birchler 3b0b49f900 Embeds: Fix typo introduced in [44484].
Props JustinSainton.
Fixes #45036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:54:51 +00:00
Gary Pendergast f9208ac14e Tests: Improve REST API tests for categories and tags.
Props birgire, SergeyBiryukov.
See #39122.
Fixes #45077.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:31:51 +00:00
Gary Pendergast 0062616aa7 Build/Tests: Default to running unit tests from `src`.
This is the actual commit, unlike [44508], which was not.

Props atimmer.
See #44492.
Fixes #45863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:14:55 +00:00
Gary Pendergast e0caaf7628 Build/Tests: Default to running unit tests from `src`.
This commit also defaults WP-CLI commands to running against `src`, too.


Props atimmer, pento.
See #44492.
Fixes #45863.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:10:51 +00:00
Dominik Schilling 6503f77539 Build/Tools: Fix typo in `phpcs.xml.dist`.
See #44366.
Built from https://develop.svn.wordpress.org/trunk@44507


git-svn-id: http://core.svn.wordpress.org/trunk@44338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:02:53 +00:00
Gary Pendergast 9f25ea37c7 Filesystem: Improve `wp_is_stream()` performance.
Instead of turning the return value of `stream_get_wrappers()` into a regex to match the scheme, we can instead extract the scheme and search the return value of `stream_get_wrappers()`.

Props schlessera, swissspidy.
Fixes #45553.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 09:51:54 +00:00
Peter Wilson 184c501d5c Cron: Fix undefined variable notice.
Restore `$gmt_time` variable removed in error from [44483].

Props afragen.
Fixes #45870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 08:37:51 +00:00
Gary Pendergast f88769fc3b Block Editor: Obey the `AUTOSAVE_INTERVAL` constant.
Props youknowriad.
Fixes #45262.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:54:49 +00:00
Gary Pendergast 68f2d8f0af Docs: Correct the documentation for `wp_list_authors()`.
The `exclude_admin` argument defaults to `true`, not `false`.

Props haruharuharuby.
Fixes #45120.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:52:50 +00:00
Gary Pendergast 21ff86cf43 Comments: Add new tests missed in [44499].
Props dshanske, birgire.
Fixes #44033.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:20:50 +00:00
Gary Pendergast f9d879905d Docs: Document the `$page_hook` action.
Props johnbillion.
Fixes #43643.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:14:51 +00:00
Gary Pendergast be127956e0 Bundled Themes: Run the `pingback_url` through `esc_url()`.
Twenties Ten through Seventeen have been updated to properly escape the pingback URL. Twenty Nineteen is already escaping the URL.

Props soulseekah, sharaz.
Fixes #43717.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:11:51 +00:00
Gary Pendergast eeac928d3b Comments: Add a new `is_avatar_comment_type()` function.
This function splits the `get_avatar_comment_types` filter out of `get_avatar_data()`.

Props dshanske, birgire.
Fixes #44033.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:00:51 +00:00
Gary Pendergast 05c1030151 Docs: Add docblocks to the members of `WP_Widget_Form_Customize_Control`.
Props subrataemfluence.
Fixes #44420.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 05:49:49 +00:00
Gary Pendergast 61dce1d422 Docs: Add docblocks for the PHPUnit factory objects.
Props andizer.
Fixes #44521.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 05:44:49 +00:00
Gary Pendergast a583725622 Docs: Update Codex references to the `Template_Hierarchy` page.
https://codex.wordpress.org/Template_Hierarchy redirects to https://developer.wordpress.org/themes/basics/template-hierarchy/, so we should link to the correct page.

Props kmeze, pento.
Fixes #45222.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 05:09:51 +00:00
Gary Pendergast e357f68667 Docs: Add `@see WP_Session_Tokens` to the `WP_User_Meta_Session_Tokens` docblock.
Props utsav72640.
Fixes #45499.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 05:04:50 +00:00
Gary Pendergast 0b44fae46b Privacy: Fix a code formatting error introduced in [44491].
See #44908.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 04:33:50 +00:00
Gary Pendergast 47e29ccba9 Privacy: Tweak the wording of the success notice when updating the privacy policy page setting.
Props garrett-eclipse.
Fixes #44129.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 04:19:49 +00:00
Gary Pendergast 099238e3a3 Privacy: Always show the privacy policy guide.
Previously, the link to the privacy policy guide would only be displayed when a privacy policy page had been selected, but the guide is generally useful without that.

Props mukesh27, birgire.
Fixes #44871.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 04:01:50 +00:00
Gary Pendergast 53e40b7fda Privacy: Remove some unnecessary parameters being passed to `wp_update_post()` by `wp_generate_user_request_key()`.
Props garrett-eclipse.
Fixes #44908.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 03:51:48 +00:00
Gary Pendergast f7d21862e8 Help/About: Add a `lang` attribute to the `<html>` tag in `readme.html`
Props audrasjb.
Fixes #44955.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 02:56:51 +00:00
Gary Pendergast 19f9dd29e9 Login: Improve the error message when retrieving a lost password.
When an invalid username or email address is entered, the form now displays a better error message.

Props mrtortai, iamfriendly, TomHarrigan, afercia, pento.
Fixes #31788.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 02:06:50 +00:00
tellyworth 942f35446f Cron API: Make wp-cron.php non-blocking where possible.
This should make cron spawning faster by ensuring requests to wp-cron.php return immediately regardless of transport method. It is enabled only on recent PHP versions with fastcgi, due to historical bugs and availability of `fastcgi_finish_request()`. This needs testing on a range of platforms, to help determine if it's safe to use in other contexts also.

Props vnsavage, johnbillion, jnylen0.
See #18738, #41358

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


git-svn-id: http://core.svn.wordpress.org/trunk@44319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 01:07:39 +00:00
Gary Pendergast fd7086bcdc Docs: Update the `@since` tag for the `comment_status_links` filter.
Fixes #42379.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 01:06:48 +00:00
Gary Pendergast c6dea4c784 Embeds: Add Instagram TV support.
Props dannydehaan.
Fixes #44557.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 00:24:50 +00:00
Gary Pendergast 0888007275 Admin: Add a "Set up your homepage" link to the Welcome panel.
As many WordPress sites use a static homepage rather than a blog, this link gives a natural next step for new sites owners wanting to configure their site in this manner.

Props professor44, joyously, nielslange, mukesh27, melchoyce.
Fixes #45019.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 00:12:49 +00:00
Gary Pendergast 64d846c7c2 Embeds: Polldaddy is now called Crowdsignal.
Crowdsignal adds an additional embed URL, survey.fm.

Props donncha.
Fixes #45036.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 23:52:50 +00:00
Peter Wilson bf3c97de77 Cron API: Add function and filter to return ready cron jobs.
Add the function `wp_get_ready_cron_jobs()` to return a modified version of the cron array limited to jobs ready to be run, ie with a timestamp of `time()` or earlier.

The new function includes the filter `pre_get_ready_cron_jobs` to allow for custom cron storage systems. This rounds out the functionality added in #32656.

Props Pento for code review.
Fixes #45797.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 21:49:49 +00:00
desrosj cd7b916d55 REST API: Introduce `rest_post_search_query` filter.
This filter allows the query arguments to be manipulated for a post search query in the REST API.

Props Chouby, swissspidy.
Fixes #45454.
Built from https://develop.svn.wordpress.org/trunk@44482


git-svn-id: http://core.svn.wordpress.org/trunk@44313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 21:45:48 +00:00
Adam Silverstein f510ab9e94 Media: improve the `human_readable_duration` function and tests.
Improve the `human_readable_duration` added in #39667:
* Remove upper limit.
* More resilient handling: remove negative prefix, trim.
* Correct @since to 5.1.0.
* Adds more test cases and improve inline docs.

Props birgire.
Fixes #39667.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 19:56:48 +00:00
desrosj bdaf864ec9 Docs: Improve accuracy of `wp_list_sort()`’s `$list` parameter description.
Props manikmist09.
Fixes #45766.
Built from https://develop.svn.wordpress.org/trunk@44480


git-svn-id: http://core.svn.wordpress.org/trunk@44311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 19:54:50 +00:00
desrosj 58d5410ceb Docs: Fix typos in Twenty Seventeen function descriptions.
Props faisal03, mukesh27.
Fixes #45466.
Built from https://develop.svn.wordpress.org/trunk@44479


git-svn-id: http://core.svn.wordpress.org/trunk@44310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 19:22:49 +00:00
desrosj 619285c34c Tests: Add missing test cases for `is_serialized_string()`.
Also, reorganize these tests into their own class.

Props pbearne.
Fixes #42870.
Built from https://develop.svn.wordpress.org/trunk@44478


git-svn-id: http://core.svn.wordpress.org/trunk@44309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 19:05:49 +00:00
desrosj 51155f3989 Docs: Specify missing `global` variables used in `wp_print_theme_file_tree()`.
The `$relative_file` and `$stylesheet` variables are used in the `wp_print_theme_file_tree()` function but were not noted within the inline documentation.

Props mukesh27, desrosj,
Fixes #43682.
Built from https://develop.svn.wordpress.org/trunk@44477


git-svn-id: http://core.svn.wordpress.org/trunk@44308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 18:33:49 +00:00
Felix Arntz e08a12d020 General: Make Update PHP notice link customizable.
After [42832], [42891] and [43006], this changeset refines the core notice informing about an outdated PHP version:

* The link to the Update PHP information page can now be adjusted using either a `WP_UPDATE_PHP_URL` environment variable, or a new `wp_update_php_url` filter.
* If that URL is different from the default one that points to https://wordpress.org/support/update-php/ or its localized equivalent, a note indicates that the linked resource has not been provided by WordPress itself, and the default URL is still linked to as an additional resource.
* The URL for the default information page has been updated to use the slug `update-php` instead of `upgrade-php`.
* `@since` annotations have been updated.

Going forward, admin areas that display information related to the PHP version should use the new function `wp_get_update_php_url()`.

Props afragen, fierevere, flixos90, markjaquith, miss_jwo, nerrad, pento, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #45686. See #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 17:27:50 +00:00
desrosj 1f6da37438 Docs: Fix order of parameter type and variable name.
The order of the type and variable name in the `param` tags for the `wp_get_default_privacy_policy_content` filter is incorrectly reversed. This moves the two into the correct order.

Props ishitaka, mukesh27.
Fixes #45416.
Built from https://develop.svn.wordpress.org/trunk@44475


git-svn-id: http://core.svn.wordpress.org/trunk@44306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 17:03:48 +00:00
desrosj f1ea8f222f Widgets: Fix custom HTML widget editor content not updating after save.
An integer comparison is performed against `control.currentErrorAnnotations`, but `control.currentErrorAnnotations` is actually an array. This fixes that comparison so the content saves correctly.

Props barryceelen.
Fixes #43657.
Built from https://develop.svn.wordpress.org/trunk@44474


git-svn-id: http://core.svn.wordpress.org/trunk@44305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 16:42:49 +00:00
Gary Pendergast 0f3835d394 Users: Add the `pre_count_users` filter.
Props spacedmonkey.
Fixes #43693.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 09:49:50 +00:00
Felix Arntz ea9286844f Multisite: Introduce `ms-site.php` and `ms-network.php` files.
By providing distinct files for the site and network APIs, a better overview is provided. Prior to this change, the `ms-blogs.php` file had grown too big, mixing site APIs, network APIs and related legacy APIs that need to be maintained. Since multisite is often used in unexpected ways, backward-compatibility is ensured by including the two new files from `ms-blogs.php`, which previously contained all functions that have been moved to the new files.

This changeset does not contain any functional changes.

Fixes #40647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 09:15:49 +00:00
Gary Pendergast 8947acbf9b Media: Add `$attr` to the `wp_get_attachment_link` filter.
Props danielbachhuber.
Fixes #40155.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 09:09:49 +00:00
Gary Pendergast e83f753246 Coding Standards: Fix an error introduced in [44465].
See #45748.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 09:03:50 +00:00
Felix Arntz 0b15142c0b Multisite: Update `@since` tags for site management APIs.
Fixes #40364. Fixes #41333.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 08:58:49 +00:00
Felix Arntz 321bdfbacf Multisite: Move site-specific metadata integrations from the wrapper functions to the low-level Meta API functions.
This complements the work in [43729] and prepares site metadata for future REST API support.

Props spacedmonkey.
Fixes #45091. See #44467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 08:48:48 +00:00
Felix Arntz 035877708d Multisite: Update `@since` tags for site meta introduction.
Fixes #37923. Fixes #40229.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 08:18:50 +00:00
Gary Pendergast 952c7253d3 Comments: Improve the Author box in the Edit Comment screen.
- Add a border below the heading, to match meta boxes.
- Remove the colons from the input labels.
- Tweak the padding and margins.

Props birgire, abdullahramzan, rhetorical, BODA1982, pento.
Fixes #43586.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 06:19:50 +00:00
Gary Pendergast 8d2ee69f9d Users: Use `email_exists()` in `send_confirmation_on_profile_email()`, instead of a manual query.
This gives us caching, and removes the use of the `$wpdb` global.

Props spacedmonkey, pento.
Fixes #45748.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 06:07:51 +00:00
Gary Pendergast fe837d19a7 Docs: Fix the `@param` type for `wp_make_plugin_file_tree()`.
`$plugin_editable_files` is an `array`, not a `string`.

Props subrataemfluence.
Fixes #45593.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 06:02:51 +00:00
Gary Pendergast 5b3e08020b Docs: Improve the `@global` tags in `wp-includes/option.php`.
Props upadalavipul.
Fixes #45581.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 06:00:50 +00:00
Gary Pendergast 7d77a6eb04 Docs: Correct the parameters passed to the `twentyseventeen_custom_header_args` filter.
The documented `$default_text_color` parameter isn't passed, and the `$video` parameter is passed, but not documented.

Props mukesh27.
Fixes #44920.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 05:56:49 +00:00
Gary Pendergast 54617423e7 Coding Standards: Improve the readability of `get_the_modified_author()`.
Props promz.
Fixes #44951.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 05:50:49 +00:00
Gary Pendergast 12b800788e Docs: Improve the `@return` description of `network_domain_check()`.
Props ishitaka, vaishalipanchal.
Fixes #45403.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 05:27:50 +00:00
Gary Pendergast 3d918be94e Docs: Add a missing `@global` to the `WP_Customize_Date_Time_Control::get_month_choices()` docblock.
Props utsav72640.
Fixes #45500.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 05:24:49 +00:00
Gary Pendergast f3656e2695 Docs: Add a reference to `WP_Customize_Control` from the `WP_Customize_Nav_Menu_Locations_Control` docblock.
`WP_Customize_Control` is the parent class of `WP_Customize_Nav_Menu_Locations_Control`.

Props utsav72640.
Fixes #45570.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 05:18:50 +00:00
Gary Pendergast 2bbe0bd7e4 Docs: Fix the `@param` types for `comments_popup_link().
Props Mirucon.
Fixes #44841.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 04:50:51 +00:00
Gary Pendergast 344348ba5b Query: Fix some code formatting issues introduced in [44452].
See #38034.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 04:32:50 +00:00
Gary Pendergast 363cfc4301 General: Replace "Happy blogging" with "Happy publishing".
As of this commit, WordPress is no longer a simple blogging platform. It's now a comprehensive publishing solution.

This also replaces a couple of other "blog" references that were missed previously.

Props igmoweb, Valer1e, audrasjb, pento.
Fixes #41000.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 04:30:50 +00:00
Gary Pendergast 1b389ea861 Permalinks: Add a `pre_wp_unique_post_slug` filter.
Returning a non-`null` value on this fillter will cause `wp_unique_post_slug()` to return early with that value, skipping potentially expensive database queries on some sites.

Props coffee2code, javorszky, iCaleb.
Fixes #21112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:47:49 +00:00
Gary Pendergast 0049b17f8a Bootstrap: Allow `WP_DEBUG_LOG` to override the `debug.log` location.
Setting `WP_DEBUG_LOG` to a file path will now cause the debug log to be written to that file, rather than the default `WP_CONTENT_DIR/debug.log`.

Props SergeyBiryukov, ethitter, sebastian.pisula, nacin.
Fixes #18391.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:42:48 +00:00
Boone Gorges 5950f27205 Query: Standardize treatment of 'orderby' values `post__in`, `post_parent__in`, and `post_name__in`.
Ordering by `post__in` was introduced in [21776], but the code assumed that
`post__in` would be a comma-separated string listing post IDs. When an array
of post IDs was passed to the `post__in` query var, 'orderby=post__in' was
not respected. This changeset changes this behavior by handling
'orderby=post__in' in the same way as most other values of 'orderby',
which ensures that arrays as well as strings can be properly parsed.

The same treatment is given to the similar `post_name__in` and
`post_parent__in` options of 'orderby', so that most query generation for
orderby clauses happens in the same place, instead of in special cases.

A slight change in the resulting SQL (related to the whitespace around
parentheses and commas) necessitates a change to an existing REST API test
that does a string comparison against the SQL query.

Props mgibbs189, kelvink.
Fixes #38034.
Built from https://develop.svn.wordpress.org/trunk@44452


git-svn-id: http://core.svn.wordpress.org/trunk@44283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:33:49 +00:00
Gary Pendergast 7f67e235a7 Install/Upgrade: Link to HelpHub instead of the Codex.
WordPress version links in the Codex (eg, https://codex.wordpress.org/Version_5.0) are redirected to their HelpHub equivalent.

Rather than relying on the redirect, Core and link directly to HelpHub.

Props swissspidy.
Fixes #45574.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:29:48 +00:00
Gary Pendergast 308a544039 Docs: Update `@since` for `populate_site_meta()`.
Fixes #44896.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:18:50 +00:00
Gary Pendergast 1d25a903c4 Docs: Update `@since` for `populate_network_meta()`.
Fixes #44895.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:17:49 +00:00
Gary Pendergast eee2e5f1d8 Docs: Update `@since` for the optional `$options` parameter to `populate_options()`.
Fixes #44893.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:15:49 +00:00
Gary Pendergast 170b03ab19 Docs: Update `@since` for `is_taxonomy_viewable()`.
Props andizer.
Fixes #44466.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:11:50 +00:00
Gary Pendergast d5b7863fbf REST API: Remove `permalink_structure` from the REST API settings endpoint.
This was ultimately fixed in #45017, so is redunant.

Reverts [42142,42359,42540].
See #41014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 02:51:50 +00:00
Joe McGill 3068e8d4e2 Upload: Don't run some upload tests on multisite.
This moves several unit tests added in [44438] so they aren't run during multisite tests.

See #45615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 21:42:50 +00:00
Joe McGill 4a80373bdf PHPCS: Fix formatting issues.
Fixes formatting issues introduced in [44438].

See #45615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 21:09:49 +00:00
Joe McGill 7bd6e079f5 Upload: Add test files for phpunit.
This is a follow up to [44438], which missed adding the test files.

See #45615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 20:53:51 +00:00
Joe McGill ac1ff02815 Upload: Fix upload failures of common text file types.
This adds some special case handling in 'wp_check_filetype_and_ext()' that prevents some common file types from being blocked based on mismatched MIME checks, which were made more strict in WordPress 5.0.1.

Props Kloon, birgire, tellyworth, joemcgill.
See #45615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 20:48:51 +00:00
desrosj f082806afa Block Editor: Display notice to the user when JavaScript is disabled.
Currently, when viewing the block editor with JavaScript disabled, the user sees a blank admin page with the admin menu sidebar. This adds an admin notice informing the user that JavaScript is required for the new block editor.

Props mkaz, pento, azaozz, ocean90, desrosj.
Fixes #45453.
Built from https://develop.svn.wordpress.org/trunk@44437


git-svn-id: http://core.svn.wordpress.org/trunk@44268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 20:40:50 +00:00
Sergey Biryukov 8917b0e89f Default Themes: Bump the version numbers and release dates.
Update the theme versions and release dates for the default themes, in time for WordPress 5.0.3.

The POT file for Twenty Eleven has also been updated.

Props laurelfulford.
Fixes #45792.
Built from https://develop.svn.wordpress.org/trunk@44435


git-svn-id: http://core.svn.wordpress.org/trunk@44266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 18:58:50 +00:00
Sergey Biryukov 1a622a8b81 Twenty Twelve: Correct `padding` rule precedence for Quote block.
Props superpoincare.
Fixes #45794.
Built from https://develop.svn.wordpress.org/trunk@44432


git-svn-id: http://core.svn.wordpress.org/trunk@44263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 18:09:54 +00:00
Dominik Schilling 0a66ea8149 Formatting: Remove unused global import for `$wp_filter` in `_restore_wpautop_hook()`.
See #45290.
Built from https://develop.svn.wordpress.org/trunk@44431


git-svn-id: http://core.svn.wordpress.org/trunk@44262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 16:59:52 +00:00
Sergey Biryukov 6b2494ba10 Plugins: Use newer "Updating PHP" page URL in the notice displayed when a plugin requires a higher PHP version.
Props afragen.
Fixes #43986. See #45686.
Built from https://develop.svn.wordpress.org/trunk@44420


git-svn-id: http://core.svn.wordpress.org/trunk@44250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 15:35:49 +00:00
Dominik Schilling 86e5a051db I18n: Expose JSON translation file paths in `load_script_textdomain()`.
Removes `file_exist()` checks before calling `load_script_translations()` to let the determined paths be passed to `load_script_translations()` which provides its own file check and the possibility to filter the path.

Props swissspidy, johnbillion, ocean90.
See #45769.
Built from https://develop.svn.wordpress.org/trunk@44418


git-svn-id: http://core.svn.wordpress.org/trunk@44248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 13:59:51 +00:00
Sergey Biryukov 9ac8b5b4f5 Importers: Use correct l10n variable in `wp.updates.installImporterError` and filesystem credentials dialog.
Missed in [40034].

Props afercia, abhayvishwakarma.
Fixes #45765.
Built from https://develop.svn.wordpress.org/trunk@44417


git-svn-id: http://core.svn.wordpress.org/trunk@44247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 13:49:49 +00:00
Sergey Biryukov efc9cbd553 Accessibility: Themes: use `aria-current` for the `Walker_Page` current link.
See [42808] for `Walker_Nav_Menu`.

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 `aria-current` after [42440], [41683], [41359], and [41371].

Props chetan200891, wpzinc.
Fixes #43522.
Built from https://develop.svn.wordpress.org/trunk@44416


git-svn-id: http://core.svn.wordpress.org/trunk@44246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 13:36:50 +00:00
Sergey Biryukov 49452cd73d Pages, Post Types: Escape CSS classes in `Walker_Page::start_el()` after the `page_css_class` filter runs.
Don't add an empty `class` attribute if there are no classes, for consistency with `Walker_Nav_Menu::start_el()`.

Props abhijitrakas, mukesh27.
Fixes #44880.
Built from https://develop.svn.wordpress.org/trunk@44415


git-svn-id: http://core.svn.wordpress.org/trunk@44245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 12:55:38 +00:00
Sergey Biryukov d3e0f97705 Taxonomy: Escape CSS classes in `Walker_Category::start_el()` after the `category_css_class` filter runs.
Don't add an empty `class` attribute if there are no classes, for consistency with `Walker_Nav_Menu::start_el()`.

Props abhijitrakas, mukesh27.
See #44880.
Built from https://develop.svn.wordpress.org/trunk@44414


git-svn-id: http://core.svn.wordpress.org/trunk@44244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 12:54:48 +00:00
Sergey Biryukov a94d70b811 Taxonomy: Escape `feed_image` argument in `Walker_Category::start_el()`.
See [11838] for the instance in `wp_list_authors()`.

Props abhijitrakas.
See #44880.
Built from https://develop.svn.wordpress.org/trunk@44413


git-svn-id: http://core.svn.wordpress.org/trunk@44243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 12:48:51 +00:00
Sergey Biryukov 9c08686353 Docs: Fix typo in the description of `status` parameter of `WP_Comment_Query`.
See #41338.
Built from https://develop.svn.wordpress.org/trunk@44412


git-svn-id: http://core.svn.wordpress.org/trunk@44242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 11:38:50 +00:00
Andrea Fercia 34fee908e3 Accessibility: Update since annotation for wp_link_pages().
Updates the since annotation for the `aria_current` argument introduced in #42440.

Fixes #41859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 08:02:48 +00:00
Sergey Biryukov f21b9db825 Docs: Correct `@since` tag for `users_pre_query` filter added in [44373].
Revert unintended change to the `@since` tag for the `WP_User_Query` instance added to `found_users_query` filter in [43660].

See #44169, #43679.
Built from https://develop.svn.wordpress.org/trunk@44410


git-svn-id: http://core.svn.wordpress.org/trunk@44240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-07 07:56:50 +00:00
desrosj 5781515e7d Twenty Seventeen: Update `since` and `see` annotations for `twentyseventeen_unique_id()`.
Previously introduced in [43659].

See #44883.
Built from https://develop.svn.wordpress.org/trunk@44408


git-svn-id: http://core.svn.wordpress.org/trunk@44238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-06 20:15:49 +00:00
desrosj 33a71f04e2 General: Update `since` annotation for `wp_unique_id()`.
In [43658], `wp_unique_id()` was introduced. This updates the `since` annotation to be accurate.

See #44883.
Built from https://develop.svn.wordpress.org/trunk@44406


git-svn-id: http://core.svn.wordpress.org/trunk@44236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-06 19:52:51 +00:00
Dominik Schilling 49351e0578 I18N/Script Loader: Support text domains other than "messages".
The inline JavaScript added by `WP_Scripts::print_translations()` should check whether `locale_data.$text_domain` exists and fall back to `locale_data.messages` otherwise.

Props swissspidy.
See #45441.
Built from https://develop.svn.wordpress.org/trunk@44403


git-svn-id: http://core.svn.wordpress.org/trunk@44233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-06 16:23:49 +00:00
laurelfulford 1c4a23faad Twenty Seventeen: Improve selectors for block editor custom colors.
Twenty Seventeen's original styles for the block editor custom colors had some issues: they weren't being applied to the button blocks due to lack of specificity, and when applied to paragraph blocks, there was no padding in the editor. This update makes sure the colors and related styles work as expected.

Fixes #45426.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-05 21:16:49 +00:00
desrosj 41aaf1d772 Editor: Fix name of the new editor for inline comment.
In [44398], an inline comment was introduced that did not refer to the new editor as the Block Editor. This corrects that comment.

See #45788.
Built from https://develop.svn.wordpress.org/trunk@44399


git-svn-id: http://core.svn.wordpress.org/trunk@44229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-05 03:48:50 +00:00
desrosj 80503c5c0e Editor: Allow the “Add Media” button tooltip to be translated in the Classic block.
In the Classic Editor, the “Add Media” button was outside of the TinyMCE editor. In the Block Editor, the “Add Media” button was moved into the TinyMCE toolbar in the Classic block, but the tooltip was not added to the list of translatable strings. This adds “Add Media” to that list.

The corresponding keyboard shortcut is also specified for the “Add Media” button.

Props afercia.

Fixes #45788.
Built from https://develop.svn.wordpress.org/trunk@44398


git-svn-id: http://core.svn.wordpress.org/trunk@44228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-05 03:40:50 +00:00
desrosj 4e3e9ca9cf Docs: Update `since` annotation for new `$url` parameter for several HTTP related filters.
Introduced in [42682].

Fixes #42186.
Built from https://develop.svn.wordpress.org/trunk@44397


git-svn-id: http://core.svn.wordpress.org/trunk@44227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 21:58:51 +00:00
desrosj f8f58da317 Docs: Update `since` annotation for new `lost_password` action parameter.
Introduced in [43542].

Fixes #44512.
Built from https://develop.svn.wordpress.org/trunk@44396


git-svn-id: http://core.svn.wordpress.org/trunk@44226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 21:52:50 +00:00
Dominik Schilling f34e1dbad1 I18N: Make domain argument optional in `wp_set_script_translations()` / `WP_Scripts::set_translations()`.
Props swissspidy.
Fixes #45489.
Built from https://develop.svn.wordpress.org/trunk@44395


git-svn-id: http://core.svn.wordpress.org/trunk@44225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 21:12:50 +00:00
desrosj 8035cf38b7 REST API: Fix typo when unregistering test post type.
A typo when unregistering a test post type for the `WP_Test_REST_Posts_Controller` class was preventing it from being properly removed. `youseeme` now?

Props rahulsprajapati.
Fixes #45124.
Built from https://develop.svn.wordpress.org/trunk@44394


git-svn-id: http://core.svn.wordpress.org/trunk@44224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 20:58:51 +00:00
Dominik Schilling d31335da85 Script Loader: Load unminified package vendor scripts when `SCRIPT_DEBUG` is set.
The unminified package vendor scripts are bundled with the release package thus the value of the `SCRIPT_DEBUG` constant should be honored.

Props earnjam.
See #45535.
Built from https://develop.svn.wordpress.org/trunk@44391


git-svn-id: http://core.svn.wordpress.org/trunk@44221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 20:27:49 +00:00
desrosj 0ee1a0e4e1 Block Editor: Upgrade `@WordPress` packages to the latest versions.
Updated packages:

- @wordpress/annotations@1.0.5
- @wordpress/api-fetch@2.2.7
- @wordpress/block-library@2.2.12
- @wordpress/block-serialization-default-parser@2.0.3
- @wordpress/blocks@6.0.5
- @wordpress/components@7.0.5
- @wordpress/core-data@2.0.16
- @wordpress/data@4.2.0
- @wordpress/deprecated@2.0.4
- @wordpress/dom@2.0.8
- @wordpress/edit-post@3.1.7
- @wordpress/editor@9.0.7
- @wordpress/format-library@1.2.10
- @wordpress/hooks@2.0.4
- @wordpress/list-reusable-blocks@1.1.18
- @wordpress/notices@1.1.2
- @wordpress/nux@3.0.6
- @wordpress/plugins@2.0.10
- @wordpress/rich-text@3.0.4
- @wordpress/url@2.3.3
- @wordpress/viewport@2.1.0

Props: youknowriad, gziolo, desrosj.

Fixes #45814.
Built from https://develop.svn.wordpress.org/trunk@44389


git-svn-id: http://core.svn.wordpress.org/trunk@44219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 19:38:57 +00:00
desrosj 8ac2091f5d Docs: Update `since` tag for comment reply link improvements.
Originally added in [42360].

Fixes #31590.
Built from https://develop.svn.wordpress.org/trunk@44388


git-svn-id: http://core.svn.wordpress.org/trunk@44218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-03 19:29:51 +00:00
desrosj 8f3ee6d243 Docs: Update `since` tag for `X-Redirect-By` header additions.
See [42408-42409], [42633], [42647].

Fixes #42313.
Built from https://develop.svn.wordpress.org/trunk@44386


git-svn-id: http://core.svn.wordpress.org/trunk@44216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-03 18:11:52 +00:00
desrosj f29dfe7b6d Docs: Update `since` tag for new `intermediate_image_sizes_advanced` filter parameter.
Originally added in [42407].

Fixes #42745.
Built from https://develop.svn.wordpress.org/trunk@44385


git-svn-id: http://core.svn.wordpress.org/trunk@44215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-03 17:47:49 +00:00
desrosj 035b9deffb Docs: Update `since` tag for HTTP status code 103 support.
Originally added in [42207].

Fixes #42490.
Built from https://develop.svn.wordpress.org/trunk@44383


git-svn-id: http://core.svn.wordpress.org/trunk@44213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-03 15:21:52 +00:00
laurelfulford dfeda2fb94 Bundled Themes: Bump script and style version numbers.
When existing scripts or styles are updated in default themes, the version numbers in the enqueues should also be bumped to make sure the old files don't cache. This update bumps version numbers for changes since version 5.0, for themes Twenty Eleven through Twenty Nineteen. 

Fixes #45679.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-02 18:04:50 +00:00
laurelfulford 30c7257aad Bundled Themes: Make sure button blocks respect settings.
When the original block editor styles were added to the existing default themes, the button blocks were styled to match how each theme styled the `button` tag. 

However, the styles should respect the block editor's default style, "Rounded", and allow switching to the other styles, like "Outlined" and "Square".

Fixes #45541.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-02 03:53:53 +00:00
laurelfulford 1d2efe8fa7 Twenty Fourteen: Correct video play button position.
A change to the MediaElement.js caused Twenty Fourteen's custom video play button to display in the top corner, rather than centered. This update returns it to its correct position. 

Props mmaumio, celloexpressions.
Fixes #44664.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-02 01:47:51 +00:00
Aaron Jorbin 16e6b4fab4 Happy New Year!
Fixes Tests_Basic::test_license

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


git-svn-id: http://core.svn.wordpress.org/trunk@44209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-01 20:37:49 +00:00
laurelfulford 7b44d484ea Twenty Fourteen: Remove text decoration from button block.
The button block in Twenty Fourteen was incorrectly inheriting a text underline from the theme's link styles.

Props bobbingwide.
Fixes #45732.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-01 17:40:54 +00:00
laurelfulford b7d28b5406 Twenty Nineteen: Update theme description and tags.
The original theme description in Twenty Nineteen was intended as a placeholder; this update replaces it with a proper description, and removes the unnecessary `theme-options` tag. 

Props jobthomas, kjellr.
Fixes #45693.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-31 18:06:50 +00:00
laurelfulford fcc423097c Twenty Nineteen: Improve menu semantics and keyboard navigation.
The menu's original markup included some non-semantic tags and an unnecessary `tabindex` attribute that made it difficult to navigate via keyboard. 

Props allancole, anevins, kjellr.
Fixes #45713.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-31 17:49:50 +00:00
Peter Wilson b1c340ef5d Docs: Correct inline documentation versions for Cron API changes.
[43540] introduced changes to allow hijacking the cron implementation.

These changes were slated for 5.0, but have since been moved to the 5.1 release.

See #43540.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-30 05:06:48 +00:00
Peter Wilson 4ae9b553c5 Docs: Correct `@see` syntax for Cron API changes.
Fixes documentation errors introduced in  [43540], [43050] and [43608].

Props coffee2code.
Fixes #45445.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-30 04:51:51 +00:00
Adam Silverstein 9b0c0c7201 Users: Add a `users_pre_query` filter to short circuit WP_User_Query results.
Add a new filter `users_pre_query` - filters the users array before the query takes place. Return a non-null value to bypass WordPress's default user queries. Similar to the `posts_pre_query` filter for WP_Query added in #36687. This filter lets you short circuit the WP_User_Query MySQL query to return your own results.

Developers should note that filtering functions that require pagination information are encouraged to set the `total_users` property of the WP_User_Query object, passed to the filter by reference. If WP_User_Query does not perform a database query, it will not have enough information to generate these values itself.

Props tlovett1, birgire, boonebgorges, spacedmonkey.
Fixes #44169.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-29 16:06:50 +00:00
Boone Gorges 7a6764679f Update `since` annotation for `wp_insert_term_duplicate_check` filter.
Originally added in [43570].

Props audrasjb.
Fixes #43271.
Built from https://develop.svn.wordpress.org/trunk@44372


git-svn-id: http://core.svn.wordpress.org/trunk@44202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 23:31:50 +00:00
laurelfulford 7a3648a1e8 Twenty Nineteen: Push right-aligned image block outside of text column.
Update right-aligned image block styles to push them outside of the text column on the front end, to match the original design and how the block looks in the editor.

Props kjellr, joen, allancole.
Fixes #45716.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 21:22:51 +00:00
laurelfulford dd37acabea Twenty Nineteen: Fix hover appearance for outlined button block style.
The outlined button block style was displaying white text on a white background on hover. This update makes sure the text remains legible on hover when this button style is applied. 

Props rickalee, kjellr.
Fixes #45726.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 20:15:49 +00:00
laurelfulford 3a155f3683 Twenty Nineteen: Remove underline from "Continue Reading" arrow.
The "Continue Reading" link that's generated by the More block is styled to include an arrow next to the text; that arrow shouldn't inherit the text underline style. This update removes it. 

Props littlebigthing, kjellr.
Fixes #45715.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 19:20:51 +00:00
laurelfulford bf308f6e92 Twenty Nineteen: Remove transparency from submenus.
On pages and posts with featured images, the top level menu items have a slight transparency on hover, which was being inherited by their submenus. This update removes that inheritance, improving readability and consistency in the menu's appearance. 

Props kjellr.
Fixes #45689.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 18:12:51 +00:00
Sergey Biryukov b7ddbe94e7 Taxonomy: Fix typo in `taxonomy_meta_box_sanitize_cb_checkboxes()` argument name.
Props itowhid06.
Fixes #45756.
Built from https://develop.svn.wordpress.org/trunk@44367


git-svn-id: http://core.svn.wordpress.org/trunk@44197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 18:04:50 +00:00
Sergey Biryukov fcab8d02e0 Build Tools: Remove unnecessary `sprintf()` in translatable strings.
Add a missing `sprintf()` for `npm install` substring.

See #44492.
Built from https://develop.svn.wordpress.org/trunk@44366


git-svn-id: http://core.svn.wordpress.org/trunk@44196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 13:54:41 +00:00
Sergey Biryukov a005e4f6e3 Build Tools: After [44359], add `src/wp-admin/js` to `.gitignore`.
Props iandunn.
See #44492.
Built from https://develop.svn.wordpress.org/trunk@44365


git-svn-id: http://core.svn.wordpress.org/trunk@44195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 13:53:51 +00:00
Boone Gorges c9a275c4a9 Update `since` annotation on `allow_empty_comment` hook.
Originally introduced in [42661].

Fixes #16979.
Built from https://develop.svn.wordpress.org/trunk@44364


git-svn-id: http://core.svn.wordpress.org/trunk@44194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 13:42:50 +00:00
Pascal Birchler 1f8ece80fa Build/Test Tools: Instruct Git and Subversion to ignore Composer's `/vendor` directory.
Re-adds changes from [42405] after being reverted by accident in [43309].

Fixes #45770

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


git-svn-id: http://core.svn.wordpress.org/trunk@44193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-28 10:00:55 +00:00
iandunn 8f3be81d8d SVN: Trim trailing whitespace to match `ignore` entry exactly.
When the entry for `wp-cli.local.yml` was added in r30057, it included a trailing whitespace. Presumably, that doesn't cause any problems with some combinations of OS/SVN client/EOL markers/etc, but in some cases it will prevent the entry from being ignored. After removing the whitespace, the file is ignored as expected.

See #30134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-25 19:27:51 +00:00
atimmer a62df4d7a7 Build tools: Fix the `travis:js` build.
After [44359] it is impossible to not use ES6 syntax for some logic in the `Gruntfile.js`, so adjust the `esversion` setting for the `Gruntfile.js` to 6. Because the previous setting in `.jshintrc` was not compatible with setting `esversion`, set the `esversion` in the `.jshintrc` explicitly.

See #44492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:54:48 +00:00
atimmer 10d1bc5b7c Build tools: Fix the `grunt format:php` build.
Re-add variable that was removed on accident by [44359]. Also run `grunt format:php` to adjust the code style.
.--This line, and those below, will be ignored--

M    Gruntfile.js
M    src/index.php
M    src/wp-admin/index.php
M    src/wp-includes/class-wp-block-parser.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@44190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:45:49 +00:00
atimmer a814e5d34e Build tools: Allow building WordPress to `src`.
After the JavaScript reorganization in [43309], it was no longer possible to test WordPress from the `src` folder. That meant a build step was required to test PHP modifications. That is suboptimal as even a simple copy is slower than a web server just serving the new file.

We achieve building to `src` by setting a `WORKING_DIR` constant in the Gruntfile that is `build` by default, but changes to `src` when the `--dev` flag is present on any Grunt command. We provide sensible defaults so some commands, such as copying `version.php`, always build to `build`.

Because testing from `build` is no longer required, we change the messages present in `index.php` and `wp-admin/index.php` to be more broadly about building WordPress.

We also change the webpack config to have more straightforward behavior based on the `buildTarget` argument. It only determines the build target now and has no implicit behavior anymore. `grunt build` still works as it worked before, to make sure that the build server produces the same `wordpress.zip` we are used to.

We do all this instead of a symlink setup because symlinks don't work on every platform.

Props omarreiss, netweb, flixos90, SergeyBiryukov.
Fixes #44492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:29:50 +00:00
laurelfulford 8e54c18d0d Twenty Nineteen: Make sure links are followed on touchend, not touchstart.
The theme's original navigation JavaScript was making it so all links on a site were immediately followed on touchstart when using a touch-enabled device. This update makes sure links are followed at touchend, to improve usability and menu behavior.

Already committed to the 5.0 branch in [44357].

Props anevins, panchen, kjellr.
Fixes #45510.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-21 21:36:49 +00:00
desrosj 0211420001 External Libraries: zxcvbn library.
This reverts [44354] for more investigation into inconsistent password strength values that passed locally prior to commit.

Unprops omarreiss, netweb, desrosj.
See #43749.
Built from https://develop.svn.wordpress.org/trunk@44356


git-svn-id: http://core.svn.wordpress.org/trunk@44186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 21:03:49 +00:00
desrosj b3a7877017 Docs: Correctly specify the `$page` parameter of `list_pages` filter as a `WP_Post`.
Props ianbelanger.
Fixes #44398.
Built from https://develop.svn.wordpress.org/trunk@44355


git-svn-id: http://core.svn.wordpress.org/trunk@44185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 20:04:50 +00:00
desrosj 7e99487473 External Libraries: Update zxcvbn to 4.2.2.
Version 4.2.2 of the zxcvbn password strength library has several bug fixes. A full list of changes can be seen here: https://github.com/dropbox/zxcvbn/compare/v4.4.1...v4.4.2.

This commit also adds the library as a project dependency, making it easier to update in the future. Because the dictionary within the library contains non-PG language, a `rot13:zxcvbn` task has been added to Grunt to perform a ROT-13 cipher on the library. This task has been added to `grunt build` and `grunt build:js`.

Props omarreiss, netweb, desrosj.
Fixes #43749.
Built from https://develop.svn.wordpress.org/trunk@44354


git-svn-id: http://core.svn.wordpress.org/trunk@44184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 19:46:50 +00:00
desrosj 4818f7e3f7 Administration: Update default fallback color for SVG icons.
Currently, when an SVG is used as a menu icon, the color is inconsistent with the other, default dashicons and the contrast ratio does not meet the minimum requirement for accessibility.

This updates the base color for the default `fresh` color scheme to ensure consistency and proper contrast.

Props swift, dschalk.
Fixes #44209.
Built from https://develop.svn.wordpress.org/trunk@44353


git-svn-id: http://core.svn.wordpress.org/trunk@44183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 19:01:48 +00:00
Sergey Biryukov b06701a167 Plugins: Colorize plugin card compatibility icons on Add Plugins screen.
Props afragen, melchoyce, daniel-koskinen.
Fixes #44619.
Built from https://develop.svn.wordpress.org/trunk@44352


git-svn-id: http://core.svn.wordpress.org/trunk@44182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 18:15:47 +00:00
Sergey Biryukov 930079c8a5 Users: Remove unnecessary `is_null()` call in `get_avatar_data()`.
The `! is_null()` portion of the condition is unnecessary, because `isset()` checks whether a variable is set *and* is not null.

Props JPry.
Fixes #44927.
Built from https://develop.svn.wordpress.org/trunk@44351


git-svn-id: http://core.svn.wordpress.org/trunk@44181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 02:49:48 +00:00
Sergey Biryukov b99aa8682c Docs: Fix typo in `wp_add_inline_script()` and `wp_add_inline_style()` description.
Props jankimoradiya.
Fixes #45705.
Built from https://develop.svn.wordpress.org/trunk@44350


git-svn-id: http://core.svn.wordpress.org/trunk@44180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 02:42:48 +00:00
Sergey Biryukov c0e076c517 Toolbar: Remove extra zero-width space in `wp-includes/css/admin-bar.css`.
Props hailite.
Fixes #44931.
Built from https://develop.svn.wordpress.org/trunk@44349


git-svn-id: http://core.svn.wordpress.org/trunk@44179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 02:32:47 +00:00
Sergey Biryukov 08e960244f Docs: Update `@since` tag for the `WP_User_Query` instance added to `found_users_query` filter in [43660].
Fixes #43679.
Built from https://develop.svn.wordpress.org/trunk@44348


git-svn-id: http://core.svn.wordpress.org/trunk@44178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 02:24:48 +00:00
Sergey Biryukov cf9a5d83bd Docs: Update `@since` tag for `edit_post_{$post->post_type}` hook introduced in [43535].
Props garrett-eclipse.
Fixes #34706.
Built from https://develop.svn.wordpress.org/trunk@44347


git-svn-id: http://core.svn.wordpress.org/trunk@44177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 02:19:48 +00:00
Sergey Biryukov f64a2674db Docs: Update `@deprecated` tag for `WP_Http::_dispatch_request()`. See [42766].
Fixes #43414.
Built from https://develop.svn.wordpress.org/trunk@44346


git-svn-id: http://core.svn.wordpress.org/trunk@44176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 01:59:48 +00:00
Sergey Biryukov 312e0d6d60 Docs: Update `@since` tag for the addition of query start time to logged query data.
Fixes #43315.
Built from https://develop.svn.wordpress.org/trunk@44345


git-svn-id: http://core.svn.wordpress.org/trunk@44175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 00:59:47 +00:00
Sergey Biryukov e3bb408fbd Plugins: Introduce actions for individual plugin load events:
* `plugin_loaded`: Fires once a single activated plugin has loaded.
* `mu_plugin_loaded`: Fires once a single must-use plugin has loaded.
* `network_plugin_loaded`: Fires once a single network-activated plugin has loaded.

Props Rarst, schlessera.
Fixes #41346.
Built from https://develop.svn.wordpress.org/trunk@44344


git-svn-id: http://core.svn.wordpress.org/trunk@44174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 00:52:48 +00:00
Sergey Biryukov 2a3473e0de Build: Remove a stray CSS comment that Autoprefixer failed to remove in [43309].
Props netweb.
See #45080.
Built from https://develop.svn.wordpress.org/trunk@44343


git-svn-id: http://core.svn.wordpress.org/trunk@44173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 00:27:47 +00:00
desrosj 921fd01582 Posts, Post Types: Correctly show hierarchical post type hierarchy in admin.
In [44185], a bug was introduced where hierarchical post types would not display in the correct default order (hierarchically).

This was caused by a `! isset()` check, which returned `false` after [44185], causing the correct default value to not be applied. This switches that conditional to use an `empty()` check, ignoring the new empty string assignment that was added to prevent a PHP notice when `compact()` is called.

Props davidbinda.
Fixes #45711.
Built from https://develop.svn.wordpress.org/trunk@44338


git-svn-id: http://core.svn.wordpress.org/trunk@44168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 22:23:50 +00:00
Drew Jaynes 9992044ce6 Docs: Add missing `@return` notations to three `MO` method DocBlocks.
Props subrataemfluence.
Fixes #44421.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 17:04:48 +00:00
Drew Jaynes 5b19e65c3b Docs: Add a missing DocBlock summary and `$action` parameter description for `wp_ajax_delete_page()`.
Props abhijitrakas.
Fixes #44206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 17:00:50 +00:00
Drew Jaynes f05077e0b1 Docs: Add backtick escaping around a variable name in the DocBlock for `update_post_meta()`.
Also adds a note to the description explaining that it can be used in place of `add_post_meta()`.

See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:39:48 +00:00
Drew Jaynes 9c934c7272 Docs: Remove erroneous pipe character usage in the `oembed_providers` filter DocBlock.
Avoids markdown table display errors when parsed and displayed in the Code Reference.

See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:36:48 +00:00
Drew Jaynes 161df2a5d9 Docs: Fix an `@see` reference to use the correct class name in the `wp_script_add_data()` DocBlock.
Props joyously.
See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:29:48 +00:00
Drew Jaynes 92aa2f9e92 Docs: Fix a few minor inline documentation typos in a variety of files and contexts.
Props ramizmanked.
Fixes #45463.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:42:49 +00:00
Drew Jaynes 1ae038d3db Docs: Update an inline `@see` reference in the DocBlock for wpdb::prepare() to reference `wpdb::esc_like()` the method instead of `esc_like()` the nonexistent function.
Props antaltettinger.
Fixes #45204. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@44160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:30:48 +00:00
Drew Jaynes 90dea00070 Docs: Ensure the optional `$width` and `$height` parameters are documented as such with defaults in the `add_image_size()` DocBlock.
Props andrewza.
Fixes #45203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:26:47 +00:00
Drew Jaynes 4f35907147 Customizer: Remove a line of commented-out code in `WP_Customize_Nav_Menus::customize_register()`.
Retains a more explicit future-compat version of the todo notation that used to accompany the commented-out code.

Props harsh175, dlh.
Fixes #44633.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:23:47 +00:00
Drew Jaynes 095e1c7f89 Docs: Remove references to the now-defunct `$merged_filters` global from two method DocBlocks in `WP_UnitTestCase`.
The `$merged_filters` global was removed in [38571].

Props frank-klein.
Fixes #44496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:13:48 +00:00
Drew Jaynes d738d15862 Docs: Fix the syntax for a parameter notation and separately add a missing return notation for two `POMO_Reader` methods.
Props subrataemfluence.
Fixes #44422.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:06:49 +00:00
Boone Gorges 88ccca5d76 Ensure that taxonomy name passed to `get_term()` filters is non-empty.
Since [34997], the `$taxonomy` parameter of `get_term()` has been
optional. This created cases where the `$taxonomy` parameter, used
to concatenate names for some filters and passed as a parameter to
others, would be empty. This changeset ensures that it's never
empty by falling back on the `taxonomy` of the located term.

Props dlh.
Fixes #45698.
Built from https://develop.svn.wordpress.org/trunk@44325


git-svn-id: http://core.svn.wordpress.org/trunk@44155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:48:48 +00:00
desrosj eef048a3e8 Docs: Correct inline documentation versions.
[43050] updated the Cron API to return values indicating success or failure when called.

At the time, these changes were slated for 5.0, but have since been moved to the 5.1 release. This updates the inline documentation to reflect that.

Fixes #21072.
Built from https://develop.svn.wordpress.org/trunk@44324


git-svn-id: http://core.svn.wordpress.org/trunk@44154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:41:49 +00:00
laurelfulford fc094984ea Default Themes: Bump the version numbers and release dates.
Update the theme versions and release dates for the default themes, in time for WordPress 5.0.2.

The POT files for Twenty Ten and Twenty Eleven have also been updated.

Fixes #45681.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:38:04 +00:00
Boone Gorges 8b95b0faf2 Update `@since` tag on taxonomy hooks to be introduced in 5.1.0.
The hooks were added in [43558] but pulled from the 4.9.x and 5.0.x series.

Fixes #44733.
Built from https://develop.svn.wordpress.org/trunk@44321


git-svn-id: http://core.svn.wordpress.org/trunk@44151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:37:15 +00:00
Jeremy Felt 0cad45c7f8 Build: Update images following [43684].
`grunt-contrib-imagemin` was updated, which included some changes to image minification. Those changes are now applies.

Merges [43785] from the 5.0 branch to trunk.

Props netweb.
See #45080.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:36:27 +00:00
Sergey Biryukov 413050b191 Block Editor: Upgrade @WordPress packages to the latest version (4.7.1)
Updated packages:

 - @wordpress/block-library@2.2.11
 - @wordpress/edit-post@3.1.6
 - @wordpress/editor@9.0.6
 - @wordpress/format-library@1.2.9

Props youknowriad, pento.
Merges [44287] to trunk.
Fixes #45637.
Built from https://develop.svn.wordpress.org/trunk@44319


git-svn-id: http://core.svn.wordpress.org/trunk@44149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:35:38 +00:00
Sergey Biryukov 11c11199d9 i18n: Remove the `script_loader_src` filter from `load_script_textdomain()`.
This filter is superfluous here, the `load_script_textdomain_relative_path` should be used for customising the textdomain path.

Props dimadin.
Merges [44288] to trunk.
See #45528.
Built from https://develop.svn.wordpress.org/trunk@44318


git-svn-id: http://core.svn.wordpress.org/trunk@44148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:34:44 +00:00
Sergey Biryukov c2c5d30410 i18n: Prevent a PHP warning when a mu-plugin loads a textdomain.
`determine_locale()` accesses the `$pagenow` global, but this is set after mu-plugins are loaded, so we need to check that it's been set.

Props swissspidy, azaozz.
Merges [44284] to trunk.
Fixes #45668.
Built from https://develop.svn.wordpress.org/trunk@44317


git-svn-id: http://core.svn.wordpress.org/trunk@44147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:33:56 +00:00
Sergey Biryukov 0094ea41a9 I18N: Introduce `load_script_translations()` as a wrapper for loading and filtering translation data for JavaScript files.
* Introduces `pre_load_script_translations` to short-circuit the function.
* Introduces `load_script_translation_file` to filter the file path for loading script translations.
* Introduces `load_script_translations` to filter the JSON-encoded translation data.

Props johnbillion, strategio, swissspidy, dimadin, ocean90.
Merges [44232] to trunk.
Fixes #45425.
Built from https://develop.svn.wordpress.org/trunk@44316


git-svn-id: http://core.svn.wordpress.org/trunk@44146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:33:07 +00:00
desrosj 1a4d511696 Block Editor: Remove a deprecated notice being generated by the meta box compat functions.
Props pento.

Merges [44248] into trunk.

Fixes #45456.
Built from https://develop.svn.wordpress.org/trunk@44315


git-svn-id: http://core.svn.wordpress.org/trunk@44145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:32:18 +00:00
desrosj 75dfa5f7f6 Script Loader: Pass the suffix to package style handles to ensure correct file names for minified RTL stylesheets.
Props ocean90.

Merges [44231] into trunk.

See #45547.
Built from https://develop.svn.wordpress.org/trunk@44314


git-svn-id: http://core.svn.wordpress.org/trunk@44144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:31:29 +00:00
desrosj 4aa38f2193 Bundled Themes: Replace “Gutenberg” in code comments and classes.
This update replaces the term “Gutenberg” in the themes code comments and classes with something more future-friendly.

Props laurelfulford.

Merges [44213] into trunk.

Fixes #45452.
Built from https://develop.svn.wordpress.org/trunk@44313


git-svn-id: http://core.svn.wordpress.org/trunk@44143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:30:41 +00:00
desrosj 6ab27f50a6 Bundled Themes: Update default block appender selector.
The markup for the default block appender changed from a text input to a text area in the editor; this update makes the same change in the default theme styles.

Props laurelfulford.

Merges [44212] into trunk.

Fixes #45450.
Built from https://develop.svn.wordpress.org/trunk@44312


git-svn-id: http://core.svn.wordpress.org/trunk@44142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:29:51 +00:00
desrosj 876676ac80 Twenty Sixteen: Fix superscript and subscript.
When using the block-based editor in Twenty Sixteen, superscript is displaying below the baseline and subscript is displaying above the baseline. This is the opposite of what should occur. This reverses the two to display correctly.

Props greg-raven, torontodigits, JDTrower.

Merges [44210] into trunk.

Fixes: #44776.
Built from https://develop.svn.wordpress.org/trunk@44311


git-svn-id: http://core.svn.wordpress.org/trunk@44141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:29:02 +00:00
desrosj 1605370d02 I18N: Fix JavaScript translations for subdirectory installations.
Fixes the `load_script_textdomain` function not resolving the md5 hash based on the relative path for WordPress installations in a subdirectory. Also adds a filter to allow sites using CDNs or other alternative asset locations to filter the relative path resolution.

Props akirk, fierevere, swissspidy, mypacecreator, babaevan, tmatsuur, ocean90, herregroen.

Merges [44209] to trunk.

Fixes #45528.
Built from https://develop.svn.wordpress.org/trunk@44310


git-svn-id: http://core.svn.wordpress.org/trunk@44140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:28:14 +00:00
Sergey Biryukov 8880458212 REST API: Remove a duplicate `require_once()`.
In `WP_REST_Attachments_Controller::create_item()`, `wp-admin/includes/image.php` was being `require_once()`-ed... twice. The superflous `require_once()` has been quietly removed.

Props david.binda.
Merges [44206] to trunk.
Fixes #45420.
Built from https://develop.svn.wordpress.org/trunk@44309


git-svn-id: http://core.svn.wordpress.org/trunk@44139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:27:26 +00:00
desrosj 7da2e20f4d Script Loader: Misplaced parenthesis when `wp-tinymce-lists` is added.
A closing parenthesis was misplaced in the `$scripts->add( 'wp-tinymce-lists' )` call, causing the dependencies and version to be incorrectly passed to `includes_url()` instead.

Also, Remove an incorrect parameter sent to `wp_get_script_polyfill()`. `wp_get_script_polyfill()` only accepts two parameters, but this call was passing a third.

Props volodymyrkolesnykov, swissspidy.

Merges [44208] and [44211] into trunk.

Fixes: #45506, #45472.
Built from https://develop.svn.wordpress.org/trunk@44308


git-svn-id: http://core.svn.wordpress.org/trunk@44138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:26:37 +00:00
desrosj 0c1769e5ba Twenty Seventeen: Bug Fixes.
- Remove unnecessary `ol` styles from editor. Twenty Seventeen was designed with bolded numbers for its ordered list styles. This was removed from the theme prior to launch, but it was left in the editor styles, so it needed to be removed there, too.
- To improve accessibility, the cookies content checkbox in the comment form needed some visible indication when it’s in focus.
- Twenty Seventeen’s editor styles contained an Internet Explorer 8 specific fix that stopped images from being scalable in the editor in other browsers. Since the editor no longer supports IE8, this fix can safely be removed.
- Fix the `font-family` used for Simplified Chinese (zh_CN) in the block editor CSS.

Props mmaumio, edpittol, pratikthink, afercia, audrasjb, mihaivalentin, subrataemfluence, vaishalipanchal, ze3kr, laurelfulford.

Merges [44203-44205] and [44235] into trunk.

Fixes #44775, #44699, #39738, #45408.
Built from https://develop.svn.wordpress.org/trunk@44307


git-svn-id: http://core.svn.wordpress.org/trunk@44137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:25:48 +00:00
desrosj 608eb55335 Bundled Themes: Fix button block custom colors on front end.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

This fix is applied to Twenty Sixteen, Twenty Fifteen and Twenty Fourteen. 

Props laurelfulford.

Merges [44197-44198] and [44200] into trunk.

Fixes #45428, #45429.
Built from https://develop.svn.wordpress.org/trunk@44306


git-svn-id: http://core.svn.wordpress.org/trunk@44136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:24:59 +00:00
desrosj a2845863e5 Twenty Nineteen: Fixes and improvements.
This commit brings over several changes that occurred upstream in the theme’s GitHub repository into core.

- Fix the gallery caption link color. https://github.com/WordPress/twentynineteen/pull/687
- Remove left padding from pullquote blocks. https://github.com/WordPress/twentynineteen/pull/690
- Print `skip-link-focus-fix` inline instead of enqueueing as blocking script. https://github
.com/WordPress/twentynineteen/pull/47
- Fix and improve some strings with placeholders. https://github.com/WordPress/twentynineteen/pull/217
- Fixes some minor code quality issues. https://github.com/WordPress/twentynineteen/pull/237
- Fix PHP Warning: Parameter must be an array or an object that implements Countable. https://github
.com/WordPress/twentynineteen/pull/661
- Add missing text domain and escaping to comment author text. https://github.com/WordPress/twentynineteen/pull/274
- Remove hyphens rule for cover image text. https://github.com/WordPress/twentynineteen/pull/691
- Fix left/right-aligned pullquote spacing. https://github.com/WordPress/twentynineteen/pull/695
- Improve `readme.txt` to follow the correct standards for themes. https://github.com/WordPress/twentynineteen/issues/689

Props kjellr, allancole, dimadin, westonruter, khleomix, grapplerulrich, iCaleb, desrosj.

Merges [44196], [44199], and [44201-44202] into trunk.

Fixes #45424.
Built from https://develop.svn.wordpress.org/trunk@44305


git-svn-id: http://core.svn.wordpress.org/trunk@44135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:24:11 +00:00
desrosj 7cbba801e2 Twenty Thirteen: Fix button block custom colors.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.

Props laurelfulford.

Merges [44195] into trunk.

Fixes #45431.
Built from https://develop.svn.wordpress.org/trunk@44304


git-svn-id: http://core.svn.wordpress.org/trunk@44134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:23:21 +00:00
desrosj 680bbf62d9 Twenty Twelve: Fix button block custom colors.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.

Props laurelfulford.

Merges [44194] to trunk.

Fixes #45432.
Built from https://develop.svn.wordpress.org/trunk@44303


git-svn-id: http://core.svn.wordpress.org/trunk@44133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:22:31 +00:00
desrosj 01029daf49 Updating Twenty Nineteen, the new default theme for 2019.
This update changes the following:

- Properly sets the primary color hue theme option. See https://github.com/WordPress/twentynineteen/pull/683.
- Add proper frontend styles for center aligned archive and category blocks. See https://github.com/WordPress/twentynineteen/pull/684.
- Fix `image_filter` theme option conditional function. See https://github.com/WordPress/twentynineteen/pull/680.
- Remove duplicate rule-line when a separator block is followed by H1/H2 in the editor. See https://github.com/WordPress/twentynineteen/pull/686.

Props richtabor, kjellr, allancole.

Merges [44192] and [44193] to trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44302


git-svn-id: http://core.svn.wordpress.org/trunk@44132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:21:42 +00:00
desrosj 3b995edda6 Twenty Eleven: Correct `font-size` and button issues.
Update a mistake in Twenty Eleven's block editor styles that erroneously sets the `font-size` to `300`, when it should set the `font-weight` to `300`. This was causing browsers in quirks mode to make the editor font size very large.

Also, simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Props laurelfulford.

Merges [44190] and [44191] to trunk.

Fixes #45421, #45433.
Built from https://develop.svn.wordpress.org/trunk@44301


git-svn-id: http://core.svn.wordpress.org/trunk@44131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:20:53 +00:00
desrosj b25a43d635 Updating Twenty Nineteen, the new default theme for 2019.
This update changes the following:

- Reverts the customization to the toolbar for wide and full blocks to make them more usable. More info here: https://github.com/WordPress/twentynineteen/pull/668
- Add `nowrap` to the columns block at breakpoints above `600px`. More info here: https://github.com/WordPress/twentynineteen/pull/674 

Props joen, kjellr, allancole.

Fixes #45369.

Merges [44189] into trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44300


git-svn-id: http://core.svn.wordpress.org/trunk@44130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:20:04 +00:00
desrosj 7f02dfc545 Twenty Ten: Custom colors should override :visited link styles on blocks.
Make sure the block editor custom colors in the theme also override the theme's `:visited` link styles. This prevents contrast issues, like in the button block -- when the background is dark, the purple `:visited` link can be difficult to read.

Props laurelfulford.

Merges [44188] into trunk.

Fixes #45434.
Built from https://develop.svn.wordpress.org/trunk@44299


git-svn-id: http://core.svn.wordpress.org/trunk@44129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:19:15 +00:00
desrosj 110aae8048 Twenty Nineteen: Code Quality Improvements.
This change adds general code quality and documentation improvements.

More info here: https://github.com/WordPress/twentynineteen/pull/546 

Props grapplerulrich, iCaleb, allancole.

Merges [44187] to trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44298


git-svn-id: http://core.svn.wordpress.org/trunk@44128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:18:26 +00:00
desrosj 5a30da57c6 PHP 7.3 Compatibility: Fix compact related notices.
In PHP 7.3, the `compact()` function has been changed to issue an `E_NOTICE` level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. This fixes a few more instances of unset variables in the WordPress admin.

The full RFC can be viewed here: https://wiki.php.net/rfc/compact.

See #44416.

Merges [44185] into trunk.

Fixes #45483.
Built from https://develop.svn.wordpress.org/trunk@44297


git-svn-id: http://core.svn.wordpress.org/trunk@44127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:17:37 +00:00
desrosj d6e8d93412 Block Editor: Upgrade `@wordpress` packages to match version 4.7.1.
Updated packages:

- `@wordpress/annotations
- `@wordpress/api-fetch
- `@wordpress/block-library@2.2.10
- `@wordpress/block-serialization-default-parser@2.0.2`
- `@wordpress/block-serialization-spec-parser@2.0.2`
- `@wordpress/blocks@6.0.4`
- `@wordpress/components@7.0.4`
- `@wordpress/core-data@2.0.15`
- `@wordpress/data@4.1.0`
- `@wordpress/date@3.0.1`
- `@wordpress/edit-post@3.1.5`
- `@wordpress/editor@9.0.5`
- `@wordpress/eslint-plugin@1.0.0`
- `@wordpress/format-library@1.2.8`
- `@wordpress/html-entities@2.0.4`
- `@wordpress/list-reusable-blocks@1.1.17`
- `@wordpress/notices@1.1.1`
- `@wordpress/nux@3.0.5`
- `@wordpress/rich-text@3.0.3`
- `@wordpress/url@2.3.2`
- `@wordpress/viewport@2.0.13`

This also includes the updates the Core blocks.

The script loader is updated to match the Gutenberg repository as well.

Props atimmer, gziolo, joen, youknowriad.

Merges [44183] to trunk.

Fixes #45442, #45637.
Built from https://develop.svn.wordpress.org/trunk@44296


git-svn-id: http://core.svn.wordpress.org/trunk@44126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:16:48 +00:00
desrosj 43bdb0e193 Editor: Remove unwanted fields before saving posts.
The meta_input, file, and guid fields are not intended to be updated through user input.

Merges [44047] to trunk.
Built from https://develop.svn.wordpress.org/trunk@44295


git-svn-id: http://core.svn.wordpress.org/trunk@44125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 21:32:48 +00:00
desrosj 8cb7058273 PHPCS: Fix alignment issues.
This fixes some array alignment issues introduced in [44293].
Built from https://develop.svn.wordpress.org/trunk@44294


git-svn-id: http://core.svn.wordpress.org/trunk@44124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:58:48 +00:00
desrosj 164452f942 KSES: Conditionally remove the `<form>` element from `$allowedposttags`.
To avoid backwards compatibility issues, `<form>` is re-added if a custom filter has added the `<input>` or `<select>` elements to `$allowedposttags`.

Merges [43994] to trunk.
Built from https://develop.svn.wordpress.org/trunk@44293


git-svn-id: http://core.svn.wordpress.org/trunk@44123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:46:48 +00:00
desrosj 3af00578e4 Media: Improve verification of MIME file types.
Merges [43988] to trunk.
Built from https://develop.svn.wordpress.org/trunk@44292


git-svn-id: http://core.svn.wordpress.org/trunk@44122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:35:49 +00:00
desrosj 38d1e7233d Block Editor: Show privacy help notice on Privacy Policy page.
When editing a page set to be the Privacy Policy page, display a help notice
containing a link to the Privacy Policy guide.

Merges [43920] to trunk.

Fixes #45057.
Built from https://develop.svn.wordpress.org/trunk@44291


git-svn-id: http://core.svn.wordpress.org/trunk@44121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:14:49 +00:00
Sergey Biryukov 985bed281c Scripts: Ensure sub-directory WordPress installs can load polyfill scripts.
`wp_get_script_polyfill()` bypasses `WP_Scripts::do_item()`, so didn't transform the script path into its fully qualified URL.

Props swissspidy, ocean90.
Merges [43960] to trunk.
Fixes #45469.
Built from https://develop.svn.wordpress.org/trunk@44286


git-svn-id: http://core.svn.wordpress.org/trunk@44116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 04:05:48 +00:00
Sergey Biryukov 7b4a2c9827 Build/Test Tools: Remove `vendor` file name entry from `.gitignore`.
Props netweb.
Merges [43747] to trunk.
Fixes #43411.
Built from https://develop.svn.wordpress.org/trunk@44285


git-svn-id: http://core.svn.wordpress.org/trunk@44115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:42:49 +00:00
Sergey Biryukov 693e8303ba Build Tools: Don't minimise CSS in the unminimised files.
Props pento.
Merges [43933] to trunk.
Fixes #45201.
Built from https://develop.svn.wordpress.org/trunk@44283


git-svn-id: http://core.svn.wordpress.org/trunk@44113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:17:48 +00:00
Sergey Biryukov 8f4440eb10 Build Tools: Don't include `.map` files in the build.
These files are fairly large, and while they're useful in development, they're not needed in the final build.

Props pento, mcsf.
Merges [43931] and [43932] to trunk.
See #45201.
Built from https://develop.svn.wordpress.org/trunk@44282


git-svn-id: http://core.svn.wordpress.org/trunk@44112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:14:52 +00:00
desrosj 077e2c5fcf Block Editor: Update @wordpress package dependencies.
Updates the following packages:

block-library, block-serialization-default-parser, block-serialization-spec-parser, blocks, edit-post, editor, format-library.

Merges [43955] to trunk.

Props youknowriad.

Fixes #45145.
Built from https://develop.svn.wordpress.org/trunk@44281


git-svn-id: http://core.svn.wordpress.org/trunk@44111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 21:59:54 +00:00
desrosj 7a97c31f4e Block Editor: Add a placeholder for meta boxes that don't work in the block editor.
If a meta box is registered with the `__block_editor_compatible_meta_box` set to `false`, it's indicating that it doesn't work in the block editor. If that's the case, we can add a place holder to inform the user that they'll need to use the classic interface to work with this meta box.

Props pento, jorgefilipecosta, peterwilsoncc, karmatosed, noisysocks, dd32, ocean90.

Merges [43941] and [43945] to trunk.

Fixes #45217.
Built from https://develop.svn.wordpress.org/trunk@44280


git-svn-id: http://core.svn.wordpress.org/trunk@44110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 21:52:53 +00:00
desrosj a9b6d58870 Default Themes: Bump the version numbers and release dates.
The POT files for Twenty Ten and Eleven have also been updated.

Props laurelfulford, maedahbatool, mrahmadawais, pento.

Merges [43964] into trunk.

Fixes #45167.
Built from https://develop.svn.wordpress.org/trunk@44279


git-svn-id: http://core.svn.wordpress.org/trunk@44109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:38:53 +00:00
desrosj d92ccd83a0 l10n: Ensure JavaScript language packages are loaded for the user locale.
`load_script_textdomain()` had a reversed check to decide if the user locale should be loaded. This check is now replaced with `determine_local()`.

Props ocean90.

Merges [43959] into trunk.

Fixes #45465.
Built from https://develop.svn.wordpress.org/trunk@44278


git-svn-id: http://core.svn.wordpress.org/trunk@44108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:36:52 +00:00
desrosj e188e2d3a3 Block Editor: Fix the WordPress packages and vendor script registration.
The version is set properly and the scripts are automatically loaded in the footer.

This patch also includes a revert for the reusable blocks enqueue script.

Props pento, swissspidy, youknowriad.

Merges [43942] into trunk.

Fixes #45402.
See #45396.
Built from https://develop.svn.wordpress.org/trunk@44277


git-svn-id: http://core.svn.wordpress.org/trunk@44107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:34:52 +00:00
desrosj c7c9bc7585 Query: Remove nextpage block delimiters when setting up global post data.
`WP_Query::setup_postdata()` splits the post up by `<!--nextpage-->`, which causes invalid block data to be contained in the post content.

This change removes the `<!-- wp:nextpage -->` and `<!-- /wp:nextpage -->`, as well.

Props pento, youknowriad, azaozz, noisysocks.

Merges [43940] into trunk.

See #45401.
Built from https://develop.svn.wordpress.org/trunk@44276


git-svn-id: http://core.svn.wordpress.org/trunk@44106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:29:51 +00:00
desrosj 03262a191f Block Editor: Refresh nonces used by `wp.apiFetch`.
Adds heartbeat nonces refreshing support to `wp.apiFetch` requests.

Props pento, adamsilverstein, dd32, desrosj, youknowriad.

Merges [43939] into trunk.

Fixes #45113. 
Built from https://develop.svn.wordpress.org/trunk@44275


git-svn-id: http://core.svn.wordpress.org/trunk@44105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:28:51 +00:00
desrosj 54ab431046 Block Editor: Fix loading the script handling the "Manage Reusable Blocks" page.
This ensures the "import from JSON" and "export JSON" buttons are shown properly. The script is loaded in the footer because it relies on the DOM being already there.

Props noisysocks, mukesh27.

Merges [43936] into trunk.

Fixes #45396.
Built from https://develop.svn.wordpress.org/trunk@44274


git-svn-id: http://core.svn.wordpress.org/trunk@44104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:08:51 +00:00
desrosj 36158d7909 Block Editor: Update `@wordpress` package dependencies.
Update packages include:

- block-library
- components
- edit-post
- editor
- format-library
- list-reusable-blocks
- nux

Other changes:

- Fix a translator comment in `edit-form-blocks.php`.
- Rename the `gutenberg_` functions in `blocks/latest-comments.php`.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.
Built from https://develop.svn.wordpress.org/trunk@44273


git-svn-id: http://core.svn.wordpress.org/trunk@44103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:06:59 +00:00
desrosj 945ba795dc WPDB: Check that `$wpdb->last_result` is countable before counting with it.
`wpdb::get_col()` iterates over `$wpdb->last_result`, which can be a non-countable value, should the preceding query have failed.

Props spacedmonkey, desrosj, pento.

Merges [43934] into trunk.

See #45299.
Built from https://develop.svn.wordpress.org/trunk@44272


git-svn-id: http://core.svn.wordpress.org/trunk@44102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:39:52 +00:00
desrosj 820f643bff Core Editor: Specify script versions for the WordPress packages and their vendor dependencies.
Using the `package.json` versions of the NPM dependencies as versions when registering the WordPress scripts.

Props dimadin, dd32, youknowriad.

Merges [43925] to trunk.

Fixes #45187.
Built from https://develop.svn.wordpress.org/trunk@44271


git-svn-id: http://core.svn.wordpress.org/trunk@44101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:19:50 +00:00
desrosj 4b0f960b7c Block Editor: Fix PHP warning when loading editor styles while in RTL.
In RTL languages, WordPress adds `style-editor-rtl.css` editor styles to the global `$editor_styles`.
This patch ignores handling these styles if the file is not preset.

Also, clarify the docs for the return value of the `block_version` function.

Props mostafa.s1990, desrosj, mukesh27.

Merges [43923] and [43924] to trunk.

Fixes #45288, #45342.
Built from https://develop.svn.wordpress.org/trunk@44270


git-svn-id: http://core.svn.wordpress.org/trunk@44100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:07:51 +00:00
desrosj bc9dfcfeb1 REST API: Preserve unknown, respect `null` in server-side block rendering.
- Skips validation where there is no attribute definition, but keeps the attribute value. Previously, the attribute would be omitted from the attributes passed to `render_callback`. Notably, this resolves an issue where `render_callback` cannot receive a block's `align` and `customClassName` attribute values, since these are defined as a client-side filter.
- Validates `null` as a proper value in its own right. Previously, a client implementation of a block could track `{“attribute":null}` as an explicitly empty value, and the server would wrongly initiate defaulting behavior. The new behavior will now only populate a default value if the attribute is not defined at all, including when unset in its being invalid per the attribute schema. 

Props aduth, noisysocks, youknowriad, danielbachhuber.

Merges [43918] to trunk.

See #45145 for the patch, #45098 for the original ticket.
Built from https://develop.svn.wordpress.org/trunk@44269


git-svn-id: http://core.svn.wordpress.org/trunk@44099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:00:52 +00:00
desrosj f2b97f3c7f REST API: Always include `title.raw`/`content.raw` for Blocks in `context=view`.
Demarcations for reusable blocks are always expected to be accessible by clients.

Props noisysocks, youknowriad.

Merges [43917] to trunk.

See #45145 for the patch, #45098 for the original ticket.
Built from https://develop.svn.wordpress.org/trunk@44268


git-svn-id: http://core.svn.wordpress.org/trunk@44098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:22:52 +00:00
desrosj e06611512c Block Editor: Expose value of `user_can_richedit()`.
In order for the Block Editor to know whether to allow visual editing, it needs to know the value of `user_can_richedit()`.

Props youknowriad, danielbachhuber.

Merges [43916] into trunk.

Fixes #45375.
Built from https://develop.svn.wordpress.org/trunk@44267


git-svn-id: http://core.svn.wordpress.org/trunk@44097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:09:51 +00:00
desrosj 9510a4f036 PHPCS: Fix code formatting issues.
In [44264], several code formatting issues were introduced. This fixes them.
Built from https://develop.svn.wordpress.org/trunk@44266


git-svn-id: http://core.svn.wordpress.org/trunk@44096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:07:52 +00:00
desrosj 2899f355a9 TinyMCE: Run the filters for the Classic block.
The `wp_editor_settings` and `disable_captions` filters need to be run for the Classic Block.

This fixes possible regressions in plugins that use these filters, and plugins that use them to add filters for the buttons, external plugins, etc.

Props azaozz.

Merges [43914] into trunk.

Fixes #45348.
Built from https://develop.svn.wordpress.org/trunk@44265


git-svn-id: http://core.svn.wordpress.org/trunk@44095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:03:51 +00:00
desrosj 9cd64e1341 Help/About: WordPress 5.0 About Page.
The About page describes all the great changes in WordPress 5.0.

Highlights:

- Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
- Added illustrations to the Four Freedoms page.
- Include a link to wporg user’s plugin favorites as a way to display only the classic plugin as a suggestion for install.
- Detail the Classic Editor plugin and the support timeline.

Props pixelverbieger, ocean90, karmatosed, pento, boemedia, lonelyvegan, sami.keijonen, TimothyBlynJacobs, xkon, afercia, laurelfulford, joostdevalk, ipstenu, matveb, joen, tinkerbelly, chanthaboune, kjellr, alexislloyd, melchoyce, mcsf, courtney0burton, Otto42, cathibosco, tobifjellner, helen, audrasjb, antpb, jjj, elrae, desrosj, azaozz, joemcgill, skithund, gziolo.

Merges [43913], [43921-43922], [43937-43938], [43946-43947], [43952-43953], [43967-43969] into trunk.

Fixes #45178.
Built from https://develop.svn.wordpress.org/trunk@44264


git-svn-id: http://core.svn.wordpress.org/trunk@44094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:36:59 +00:00
desrosj 6bec9ed8f6 Twenty Sixteen: Update theme’s wide image styles to include Image Blocks
Twenty Sixteen includes functionality and styles that make full-size images extend wider than the content when they are added to posts, and appear below the post meta. This update adds the same behavior to image blocks and their captions.

Merges [43911] to trunk.

Props laurelfulford.
Fixes: #45380.
Built from https://develop.svn.wordpress.org/trunk@44263


git-svn-id: http://core.svn.wordpress.org/trunk@44093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 15:46:52 +00:00
desrosj 4f86a03258 Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.

Merges [43891], [43903], and [43919] to trunk.

Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262


git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 15:37:00 +00:00
desrosj 9d7aa3436e Block Editor: Update `@wordpress` dependencies.
Changes of note:

- Includes the new Annotations API package.
- `wp-polyfill-ecmascript.js` is renamed to `wp-polyfill.js`.
- `strip_dynamic_blocks()` has been removed in favor of `excerpt_remove_blocks()`.
- The PHP block parser is now syncing from the `block-serialization-default-parser` package.
- `do_blocks()` uses the new parser.
- The `do_block` filter has been removed from `do_blocks()`, in favor of a `render_block` filter in `render_block()`.

Also, a little cleanup to `render_block()`. Always normalize `$block['attrs’]` to array in `’render_block’` filter.
Props pento, azaozz.

Merges [43884] and [43888] to trunk.

See #45145, #45190, #45264, #45282.
Built from https://develop.svn.wordpress.org/trunk@44261


git-svn-id: http://core.svn.wordpress.org/trunk@44091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 04:52:00 +00:00
desrosj bbe9a37b6c Editor: Add custom fields meta box support in the block editor.
This brings support for the custom fields meta box into the new block editor.

The `webpack` and `copy-webpack-plugin` packages have also been updated.

This does not bump the `@wordpress` packages like in [43861] because of conflicts with package versions already installed in `trunk`. The packages will be brought up to date in a subsequent merge.

Merges [43861] and [43863] into trunk.

See #45145.
Fixes #45257.
Built from https://develop.svn.wordpress.org/trunk@44260


git-svn-id: http://core.svn.wordpress.org/trunk@44090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:52:51 +00:00
Sergey Biryukov 6ffafa5bc7 TinyMCE: Fix the keyboard shortcut (Alt+Shift+H) to not open the default Block Editor help modal and change the title of the help modal to "Classic Block Keyboard Shortcuts" in the Classic BLock. Also remove Alt+Shift+Z in the Classic Block as it conflicts with the Block Editor.
Props azaozz.
Merges [43915] to trunk.
Fixes #45365.
Built from https://develop.svn.wordpress.org/trunk@44257


git-svn-id: http://core.svn.wordpress.org/trunk@44087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:32:21 +00:00
Sergey Biryukov 60c96f7377 Tests: Replace use of `$this->server` with `rest_get_server()` in `test_get_additional_field_registration_null_schema()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43908], from the 5.0 branch, was merged into trunk in [44254] and used the now unavailable `$this->server`.

This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.

See #45220, #41641.
Built from https://develop.svn.wordpress.org/trunk@44256


git-svn-id: http://core.svn.wordpress.org/trunk@44086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:31:30 +00:00
Sergey Biryukov 589af44fc1 Tests: Replace use of `$this->server` with `rest_get_server()` in `test_registered_query_params()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43897], from the 5.0 branch, was merged into trunk in [44250] and used the now unavailable `$this->server`.

This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.

See #43316, #41641.
Built from https://develop.svn.wordpress.org/trunk@44255


git-svn-id: http://core.svn.wordpress.org/trunk@44085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:30:39 +00:00
Sergey Biryukov ff3ea55f76 REST API: Include fields with null schema in `get_fields_for_response()`.
In [43736], we prevented rendering fields when not present in `?_fields=`. However, because `get_fields_for_response()` is dependent on `get_item_schema()`, any custom fields registered with a null schema would be incorrectly excluded from the response. Because the REST API permits a null schema for `register_rest_field()`, those fields should be included in the available fields for a response.

Props danielbachhuber.
Merges [43908] to trunk.
Fixes #45220.
Built from https://develop.svn.wordpress.org/trunk@44254


git-svn-id: http://core.svn.wordpress.org/trunk@44084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:29:47 +00:00
Sergey Biryukov 88d99119bc PHPCS: Fix errors introduced in [44250].
See #43316.
Built from https://develop.svn.wordpress.org/trunk@44253


git-svn-id: http://core.svn.wordpress.org/trunk@44083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:28:57 +00:00
Sergey Biryukov 07ce537eb8 Build Tools: Minify the package CSS when building.
CSS coming from the `@wordpress` packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when `SCRIPT_DEBUG` was set to `false`.

Props websupporter.
Merges [43905] to trunk.
Fixes #45330.
Built from https://develop.svn.wordpress.org/trunk@44252


git-svn-id: http://core.svn.wordpress.org/trunk@44082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:28:06 +00:00
Sergey Biryukov dbc692fb84 Block Editor: Load TinyMCE inline scripts later.
Previously, the TinyMCE inline scripts were added on the `init` action in the block editor. In the classic editor, however, these scripts are loaded when the TinyMCE window is printed, and some plugins rely on them being loaded later, so they can attach to the appropriate filters.

Props pento.
Merges [43901] to trunk.
Fixes #45338.
Built from https://develop.svn.wordpress.org/trunk@44251


git-svn-id: http://core.svn.wordpress.org/trunk@44081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:27:12 +00:00
Sergey Biryukov 940a4be804 REST API: Avoid using 'parent' as path argument name for autosaves.
When 'parent' is set as the path argument name, it gets passed down through to the `create_item()` method and can erroneously reset the 'parent' value on the post itself. Instead, we rename the argument to 'id' and replicate the revision controller's `get_items_permissions_check()` to instead reference 'id'.

Also ensures revision query params (of which there are many) aren't exposed as the query params for autosaves (of which there are two).

Props TimothyBlynJacobs.
Merges [43897] to trunk.
See #43316.
Built from https://develop.svn.wordpress.org/trunk@44250


git-svn-id: http://core.svn.wordpress.org/trunk@44080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:26:22 +00:00
Sergey Biryukov 909cddb3b8 Scripts: Fix a PHP error in admin-ajax calls.
When making an ajax request, `wp_enqueue_registered_block_scripts_and_styles()` checked if `is_admin()` was true before accessing `$current_screen`, rather than checking if `$current_screen` was defined. This is usually fine, execept for in ajax requests.

Props ocean90, foreverpinetree, pento.
Merges [43893] and [43894] to trunk.
Fixes #45302.
Built from https://develop.svn.wordpress.org/trunk@44249


git-svn-id: http://core.svn.wordpress.org/trunk@44079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:25:31 +00:00
Sergey Biryukov e8cbdf9405 Block Editor: Fix the TinyMCE `wordpress` plugin to handle hiding/showing of toolbars in the classic block. Change the classic block toolbar to use the (now fixed) `wp_adv` button.
Props azaozz.
Merges [43889] and [43890] to trunk.
Fixes #45264.
Built from https://develop.svn.wordpress.org/trunk@44247


git-svn-id: http://core.svn.wordpress.org/trunk@44077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:23:55 +00:00
Sergey Biryukov 8f1ed83852 Build Tools: Revert unrelated changes to `Gruntfile.js` added in [44245].
See #45156.
Built from https://develop.svn.wordpress.org/trunk@44246


git-svn-id: http://core.svn.wordpress.org/trunk@44076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:23:04 +00:00
Sergey Biryukov c6d8f995cd Build Tools: Add non-minified `@wordpress` scripts to the build output.
Props atimmer.
Merges [43886] to trunk.
See #45156.
Built from https://develop.svn.wordpress.org/trunk@44245


git-svn-id: http://core.svn.wordpress.org/trunk@44075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:22:13 +00:00
Sergey Biryukov 6ef54307b1 Block Editor: Hide the Custom Fields meta box option if that meta box has been removed.
Some plugins remove the Custom Fields meta box, particularly when they provide functionality that replaces it. The block editor would correctly not display this meta box in these circumstances, but it still showed the option to display or hide it.

Props pento, noisysocks.
Merges [43885] to trunk.
See #45282.
Built from https://develop.svn.wordpress.org/trunk@44244


git-svn-id: http://core.svn.wordpress.org/trunk@44074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:21:21 +00:00
Sergey Biryukov 223eb21b47 PHPCS: Fix errors introduced in [44241].
See #45283.
Built from https://develop.svn.wordpress.org/trunk@44243


git-svn-id: http://core.svn.wordpress.org/trunk@44073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:20:29 +00:00
Sergey Biryukov 659ca2bd1e Tests: Fix tests broken in PHP 5.x after [43879].
Props pento.
Merges [43883] to trunk.
See #45290.
Built from https://develop.svn.wordpress.org/trunk@44242


git-svn-id: http://core.svn.wordpress.org/trunk@44072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:19:38 +00:00
Sergey Biryukov 7f8d6eccd0 Meta Boxes: Add the `block_editor_meta_box_hidden_fields` action.
Lacking an appropriate action in the classic editor, plugins that add meta boxes have historically hooked into various actions in order to add hidden input fields.

This change also adds backwards compatibility for two of the most common: `edit_form_after_title`, and `edit_form_advanced`.

Props pento, danielbachhuber.
Merges [43882] to trunk.
Fixes #45283.
Built from https://develop.svn.wordpress.org/trunk@44241


git-svn-id: http://core.svn.wordpress.org/trunk@44071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:18:47 +00:00
Sergey Biryukov eccc31aadf Block Editor: Prevent the meta box form from being accidentally submitted.
Meta boxes are loaded inside a wrapper form, that the block editor submits as part of the saving process. It shouldn't be submitted manually.

Props pento.
Merges [43880] to trunk.
Fixes #45284.
Built from https://develop.svn.wordpress.org/trunk@44240


git-svn-id: http://core.svn.wordpress.org/trunk@44070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:17:56 +00:00
Sergey Biryukov 9e54ec265c I18N: Set translations for all WordPress packages scripts.
Calls `wp_set_script_translations` for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Merges [43878] to trunk.
Fixes #45161.
Built from https://develop.svn.wordpress.org/trunk@44239


git-svn-id: http://core.svn.wordpress.org/trunk@44069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:17:04 +00:00
Sergey Biryukov 030b1ba144 PHPCS: Fix errors introduced in [44236].
See #45221.
Built from https://develop.svn.wordpress.org/trunk@44238


git-svn-id: http://core.svn.wordpress.org/trunk@44068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:16:12 +00:00
Sergey Biryukov 86bff28a19 Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90.
Merges [43877] to trunk.
Fixes #45271.
Built from https://develop.svn.wordpress.org/trunk@44237


git-svn-id: http://core.svn.wordpress.org/trunk@44067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:15:20 +00:00
Sergey Biryukov c72f02aa49 TinyMCE:
- Fix parsing of the init array in script-loader.
- Do not JSON encode the options object when outputting it from PHP.
- Remove JSON decoding of TinyMCE's `style_formats` option.

Props azaozz.
Merges [43867] to trunk.
Fixes #45221.
Built from https://develop.svn.wordpress.org/trunk@44236


git-svn-id: http://core.svn.wordpress.org/trunk@44066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:14:31 +00:00
Jeremy Felt 9988653fdf Tests: Replace uses of `$this->server` with `rest_get_server()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43862], from the 5.0 branch, was merged into trunk in [44225] and used the now unavailable `$this->server`.

This updates the new tests from the 5.0 branch to use the expected `rest_get_server()`.

See #45269, #41641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:12:54 +00:00
Jeremy Felt 677a497ee2 Build Tools: Update `grunt-sass` to v3 and add `node-sass` v4.
This fixes an error in the PHP 5.2 and 5.3 Travis builds after [44219].

Props netweb.
See #45241.
Fixes #45664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:12:03 +00:00
desrosj fcaad833b7 Tests: Update a test that relied on the Hello Dolly plugin version.
[43900] changed the plugin version, causing a unit test failure.

Merges [43902] to trunk.

See #45345.
Built from https://develop.svn.wordpress.org/trunk@44230


git-svn-id: http://core.svn.wordpress.org/trunk@44060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:09:37 +00:00
desrosj 147ce45d29 Hello Dolly: Hide the lyrics in the block editor.
I'm sorry, Hello Dolly. You're my favorite plugin, but the way you output your lyrics doesn't play nicely with the block editor, particuarly on mobile devices.

This isn't Farewell Dolly, you're still on every other admin page, and I know you'll come back better and stronger.

Merges [43900] to trunk.

Props joen.
See #45345.
Built from https://develop.svn.wordpress.org/trunk@44229


git-svn-id: http://core.svn.wordpress.org/trunk@44059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:08:46 +00:00
desrosj be0b403077 Docs: Future-proof comments referencing 5.0 TODOs.
Some Customizer-related files contain inline comments referencing work to do for #42364 for 5.0. Those comments are now outdated as #42364 was moved to the 5.1 milestone.

Merges [43887] to trunk.

Props dlh, pento.
Fixes #45115.
Built from https://develop.svn.wordpress.org/trunk@44228


git-svn-id: http://core.svn.wordpress.org/trunk@44058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:07:55 +00:00
desrosj f4fa2c362e Bundled Themes: Add theme support for responsive embeds
Add `add_theme_support( 'responsive-embeds' );` to all of the responsive default themes as part of their block editor support. This makes sure any embeds coming from the new block-based editor maintain their aspect ratios at different screen sizes.

Merges [43868] into trunk.

Props laurelfulford.
Fixes #45274.
Built from https://develop.svn.wordpress.org/trunk@44227


git-svn-id: http://core.svn.wordpress.org/trunk@44057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:07:04 +00:00
Jeremy Felt 7509965a56 Formatting: Ensure `wpautop()` isn't run on content generated from blocks.
As `do_blocks()` is run before `wpautop()` in the_content filter, we can remove in a Just In Time fashion, before that filter is run.

After `wpautop()`s original priority has passed, we can re-add it in a Just Too Late fashion, to ensure it's available if `the_content` filter is run multiple times on a page load.

Merges [43879] and [43881] from the 5.0 branch to trunk.

Props pento, nerrad.
Fixes #45290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:06:12 +00:00
Jeremy Felt 58fdce722c REST API: Prevent duplicate firing of `rest(_after)?_insert_attachment` actions.
Merges [43862] from the 5.0 branch to trunk.

Props danielbachhuber, peterwilsoncc.
Fixes #45269.
See #42864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:05:20 +00:00
Jeremy Felt 7ffb7340f5 Editor: Cast the result of the `default_content`, `default_title`, and `default_excerpt` filters.
If a plugin returns a non-string value (or returns `null`) on these filters, it can cause errors in the block editor. Casting them as a string prevents these errors.

Merges [43858] from the 5.0 branch to trunk.

Props dd32.
See #45236.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:04:29 +00:00
Jeremy Felt 7b58ca24e3 Block Editor: Remove CodeMirror settings.
CodeMirror is no longer used in the block editor, so we don't need to load the settings.

Merges [43857] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45248.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:03:38 +00:00
Jeremy Felt c92118203b Block Editor: Don't show back compat or incompatible meta boxes in Options.
Meta boxes that exist for back compat, or that are incompatible with the block editor aren't displayed, so they don't need an option to display or hide them in the Options dialog.

Merges [43856] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:02:46 +00:00
Jeremy Felt 49418dbd7e Posts: Remove the slug from Quick Edit for posts that are not `is_post_type_viewable()`.
This is a followup to [43728], which added the same check, but using the `publicly_queryable` option. This behaviour is incorrect for `_builtin` post types, which go by the logic in `is_post_type_viewable()`, instead.

Merges [43855] from the 5.0 branch to trunk.

Props pento.
See #43278.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:01:56 +00:00
Jeremy Felt b93dd61e90 Blocks: Add "Export as JSON" action to the `wp_block` post list screen.
Remove the "Quick Edit" for `wp_block`s, too, as they don't need any of that functionality.

Merges [43854] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45247.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:01:05 +00:00
Jeremy Felt fc22863570 Build Tools: Switch to Node 10.13.0.
Now that Node 10 is the LTS branch, with 10.13.0 as the first LTS release, let's use that for building WordPress.

Merges [43853] from the 5.0 branch to trunk.

Props pento.
See #45241.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:00:14 +00:00
Jeremy Felt 014d87067d REST API: Fix array syntax after [43851].
I thought I was writing JavaScript. Alas.

Merges [43852] from the 5.0 branch to trunk.

Props danielbachhuber.
See #45196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:41:54 +00:00
Jeremy Felt 0451345941 REST API: Regenerate fixure schema after introduction of new endpoints.
This fixture schema ensures `wp-api-generated.js` doesn't change when running tests in local dev environments.

Merges [43851] from the 5.0 branch to trunk. `wp-api-generated.js` generated based on current trunk.
Props danielbachhuber.
Fixes #45196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:38:53 +00:00
Jeremy Felt e42dd489bc REST API: Restore access to audio/video metadata functions.
Ensures `wp_read_video_metadata()`/`wp_read_audio_metadata()` functions are available when uploading video and audio. Fixes error introduced in [43589].

Merges [43850] from the 5.0 branch to trunk.

Props ocean90.
See #43757.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:26:53 +00:00
Jeremy Felt c9f8525211 Blocks: Include necessary labels for the 'wp_block' post type.
Merges [43849] from the 5.0 branch to trunk.

Props danielbachhuber.
See #45098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:25:52 +00:00
Jeremy Felt ff7b1bfe48 Block Editor: Fix meta boxes not showing.
The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.

To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.

Merges [43837] from the 5.0 branch to trunk.

Props pento, peterwilsoncc.
Fixes #45172.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:19:54 +00:00
iandunn 614df6b5cc KSES: Make the URI attributes DRY.
This commit introduces the `wp_kses_uri_attributes` function and filter. The function centralizes the list of attributes, in order to prevent inconsistency, and the filter provides a way for plugins to customize the attributes.

Merges [44014] and [44017] to `trunk`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-15 11:18:25 +00:00
desrosj d6c74f0a32 Networks and Sites: Fix incorrect variable location.
This fixes an issue introduced in [44166] where the `$groupby` variable was inserted too low in the `get_site_ids()` function while merging [43832] into `trunk`. The merged location did not account for a new conditional statement that existed only in `trunk`, and would have resulted in values assigned to `$groupby` being erased in certain scenarios.

Props spacedmonkey.

See #44416.
Fixes #45582.
Built from https://develop.svn.wordpress.org/trunk@44186


git-svn-id: http://core.svn.wordpress.org/trunk@44016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-15 11:02:18 +00:00
atimmer 7616bf91af FTP/PemFTP Library: Fix some PHP notices.
ftp_base::glob() used each(), which is deprecated as of PHP 7.2.
ftp_base::fget() was missing the decleration of its third parameter, $rest.

Props itowhid06, pento.
Merges [43848] to trunk.
Fixes #44489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-15 11:00:40 +00:00
atimmer 96b2a4677c Build Tools: Update the @wordpress packages.
Trunk now matches Gutenberg 4.2 RC1.

Props pento.
Merges [43847] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:20:00 +00:00
atimmer e055e026e3 l10n: Avoid calling is_user_logged_in() in determine_locale().
is_user_logged_in() is a pluggable function, and loaded after plugins are loaded. If a plugin calls __() too early, is_user_logged_in() is missing and WordPress will fatal. get_user_locale() already handles this scenario for us, so it's safe to rely on exclusively.

Props danielbachhuber.
Merges [43846] to trunk.
See #44758.
Fixes #45235.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:15:54 +00:00
atimmer 86ccb815e7 Build Tools: Update @wordpress packages.
Props pento.
Merges [43843] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:07:58 +00:00
atimmer 7aeb401531 Tests: Fix failing unit tests caused by [43840].
Props pento.
Merges [43841] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 11:23:54 +00:00
atimmer cc13a1f3a0 General: Fix code formatting issues.
Fix code formatting after [44174] and [44177].

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


git-svn-id: http://core.svn.wordpress.org/trunk@44008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 11:02:53 +00:00
atimmer a603510b73 Build Tools: Upgrade @wordpress packages to the latest version.
This also includes the new @wordpress/format-library and @wordpress/notices packages.

package-lock.json has been completely regenerated in this commit.

Props pento.
Merges [43840] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 10:55:01 +00:00
atimmer 0962e186e8 Build Tools: Add an npm script shortcut to run grunt.
Rather than needing to install grunt globally, this allows running grunt from node_modules, instead.

npm run grunt ... is effectively the equivalent of running grunt ....

Props andrew.taylor, pento.
Merges [43836] to trunk.
See #45214.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 09:47:52 +00:00
atimmer a409c41f62 Meta boxes: Don't show the block editor incompatiblity message when it doesn't apply.
We should only be showing this message in the classic editor interface, for meta boxes that are marked as being incompatible with the block editor.

Props pento.
Merges [43839] to trunk.
Fixes #45207.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 09:42:53 +00:00
atimmer 20992de206 Meta boxes: Don't assume that callback args are an array.
While the documentation for add_meta_box() specifices that $callback_args should be an array, this has never been enforced, and we have workarounds in place for when it's passed as something other than an array.

Rather than break sites that are passing unexpected data, we can quietly just allow for it, instead.

Props johnjamesjacoby, birgire, pento.
Merges [43838] to trunk.
Fixes #45206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 09:39:51 +00:00
Gary Pendergast d2782aabc5 REST API: Improve performance by avoiding `call_user_func()`.
The `get_compact_response_links()` method was introduced in WP 4.5, and this conditional is no longer necessary.

Merges [43834] from the 5.0 branch to trunk.

Props schlessera, timothyblynjacobs.
Fixes #45189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 06:04:55 +00:00
Gary Pendergast d8863244cb Block Editor: Preload `wp/v2/media` with OPTIONS for caps check.
Also introduces a `block_editor_preload_paths` filter for plugins and themes to preload additional data.

Merges [43833] from the 5.0 branch to trunk.

Props imath, mattheu, danielbachhuber.
Fixes #45194.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 06:02:52 +00:00
Gary Pendergast 5b16eb19a8 Script Loader: Add translator comments and remove textdomains.
The inline script for `wp-date` incorrectly included a textdomain, and lacked translator comments.

Merges [43831] from the 5.0 branch to trunk.

Props mukesh27.
Fixes #45191, #45162.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:58:52 +00:00
Gary Pendergast 3eafdad299 Meta Boxes: Fix error when a meta box is rendered with a static method callback.
When `WP_DEBUG` is set, ensure that a static method callback is passed to `ReflectionMethod`, instead of `ReflectionFunction`.

Merges [43830] from the 5.0 branch to trunk.

Props DrewAPicture.
Fixes #45192.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:55:53 +00:00
Gary Pendergast f46fbae857 I18N: Add JavaScript translation support.
Adds the `wp_set_script_translations()` function which registers translations for a JavaScript file. This function takes a handle, domain and optionally a path and ensures JavaScript translation files are loaded if they exist.

Merges [43825,43828,43859,43898] from the 5.0 branch to trunk.

Props herregroen, atimmer, omarreiss, nerrad, swissspidy, ocean90, georgestephanis.
Fixes #45103, #45256.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:52:52 +00:00
Gary Pendergast 4739b8147b Upgrade/Install: Convert `Sample Page`, `Hello World`, and `Privacy Policy` to block content.
Merges [43820,43912] from the 5.0 branch to trunk.

Props desrosj, garrett-eclipse, danielbachhuber, dd32, ocean90.
Fixes #45151.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:43:52 +00:00
desrosj 7cb9a98a5b Nav Menus: Fix a PHP 7.3 error when switching themes.
When switching themes, `wp_map_nav_menu_locations()` is used to ensure nav menus are placed in the relevant menu location. Occasionally, menus are registered to locations with numeric slugs, rather than strings. `wp_map_nav_menu_locations()` assumed it would be the latter, and ran `stripos()` on those numeric slugs. This behavior is deprecated in PHP 7.3.

As this is the last PHP 7.3 error in unit tests, this commit also removes PHP 7.3 from Travis' `allowed_failures` list.

Props pento, desrosj, jorbin.

Merges [43899] to trunk.

See #45018.
Built from https://develop.svn.wordpress.org/trunk@44167


git-svn-id: http://core.svn.wordpress.org/trunk@43997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:16:52 +00:00
desrosj 268402cf53 PHP7.3 compatibility: Fix compact throwing notices.
In PHP 7.3, the `compact()` function has been changed to issue an `E_NOTICE` level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. The full RFC can be viewed here: https://wiki.php.net/rfc/compact.

Props jorbin, desrosj.

Merges [43819] and [43832] to trunk.

Fixes #44416.
Built from https://develop.svn.wordpress.org/trunk@44166


git-svn-id: http://core.svn.wordpress.org/trunk@43996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:13:52 +00:00
Gary Pendergast 8464097ea4 Editor: Merge some minor bug fixes.
There were some tweaks made to the post editor in WordPress 5.0 that hadn't been merged to `trunk`, this commit rectifies that.

Merges [43815,43816] from the 5.0 branch to trunk.

Props birgire, jorbin, abdullahramzan, adamsilverstein, mrahmadawais, airathalitov, ajitbohra, schlessera, albertomedina, aldavigdis, alexsanford1, xyfi, nitrajka, afercia, andreiglingeanu, euthelup, aduth, sumobi, anevins, azaozz, androb, andrewserong, kallehauge, nosolosw, apeatling, atimmer, arnaudban, asvinballoo, b-07, benlk, blowery, caxco93, benjamin_zekavica, kau-boy, bernhard-reiter, bcolumbia, bph, boblinthorst, bradyvercher, bpayton, brentswisher, bronsonquick, burhandodhy, icaleb, chouby, ehg, chrisvanpatten, butimnoexpert, christophherr, chriskmnds, claudiosanches, danielbachhuber, mrmadhat, danielhw, danieltj, goldsounds, dfangstrom, daniloercoli, dannycooper, nerrad, dsawardekar, davemoran118, davidherrera, dryanpress, davidsword, davisshaver, dmsnell, dlocc, diegoreymendez, dd32, dency, ocean90, donnapep, chopinbach, electricfeet, eliorivero, sewmyheadon, ericnmurphy, foobar4u, circlecube, fabs_pim, flixos90, floriansimeth, gma992, garrett-eclipse, garyj, pento, doomwaxer, revgeorge, gziolo, bordoni, hardeepasrani, helen, luehrsen, herbmiller, toro_unit, ianbelanger, iandunn, igorsch, ipstenu, ireneyoast, israelshmueli, sisanu, jd55, copons, jnylen0, jamestryon, ephoxjames, jamiehalvorson, jsnajdr, jagnew, dciso, octalmage, vengisss, jhoffm34, shenkj, audrasjb, jblz, jeremyfelt, motleydev, jipmoors, sephsekla, joemaller, joemcgill, joen, johndyer, johnjamesjacoby, joshuawold, johnny5, desrosj, jonsurrell, belcherj, sirjonathan, koke, jorgefilipecosta, shelob9, jvisick77, julienmelissas, kopepasah, kadamwhite, codebykat, ryelle, gwwar, kevinwhoffman, coderkevin, ixkaito, kjellr, obenland, lancewillett, postphotos, loicblascos, lucasstark, luigipulcini, lucaskowalski, lukepettway, mahdiyazdani, mahmoudsaeed, mkaz, tyxla, markjaquith, mapk, vindl, m-e-h, mboynes, mattheu, lonelyvegan, mtias, napy84, maurobringolf, maximebj, mayukojpn, woodent, michaelhull, mmtr86, stubgo, simison, mihai2u, mike-haydon-swo, mnelson4, mpheasant, mikeschroder, idpokute, mikeyarce, dimadin, gonzomir, milesdelliott, warmarks, munirkamal, nfmohit, nateconley, greatislander, njpanderson, notnownikki, nielslange, nikschavan, potbot, nshki, webmandesign, oskosk, pglewis, pareshradadiya-1, swissspidy, pbearne, pauldechov, psealock, paulstonier, paulwilde, pedromendonca, ptasker, peterwilsoncc, tyrannous, strategio, piersb, delawski, prtksxna, presskopp, rachelbaker, rachelmcr, rakshans1, rahmon, lamosty, youknowriad, riddhiehta02, noisysocks, deviodigital, sanchothefat, robertsky, _dorsvenabili, rohittm, magicroundabout, rmccue, welcher, ryo511, sagarprajapati, samikeijonen, scottmweaver, kluny, sharaz, giventofly76, designsimply, sstoqnov, hypest, netweb, stevehenty, stuartfeldt, sergioestevao, soean, tammie_l, karmatosed, thrijith, timgardner, timmydcrawford, tjnowell, mirucon, travislopes, truongwp, tjfunke001, vishalkakadiya, vtrpldn, walterebert, westonruter, skorasaurus, somtijds, earnjam, williampatton, willybahuaud, yoavf, zebulan, ziyaddin, abhijitrakas, andreamiddleton, csabotta, dixitadusara, etoledom, faishal, hideokamoto, imath, iseulde, j-falk, jaswrks, johnwatkins0, jomurgel, notlaura, leahkoerper, mcsf, meetjey, 0mirka00, mitogh, ephoxmogran, tacrapo, mzorz, nagayama, omarreiss, ramonopoly, rileybrook, tinkerbelly, shaileesheth, sikander, ssousa, tfrommen, yahil.

Fixes #45037.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:12:52 +00:00
Gary Pendergast 47b6c4e0d7 Scripts: Revert some functions being incorrectly removed in [44163].
Built from https://develop.svn.wordpress.org/trunk@44164


git-svn-id: http://core.svn.wordpress.org/trunk@43994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:53:54 +00:00
Gary Pendergast bffe848347 Build Tools: Update the `@wordpress/*` packages.
Merges [43801,43803] from the 5.0 branch to trunk.

See #45145.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:44:01 +00:00
desrosj ca80466039 Scripts: Add a missing date format to the `wp-date` config.
`wp-date` recently added the `datetimeAbbreviated` format, but the config wasn't sending it on page load.

Props pento.

Merges [43818] to trunk.

Fixes #45158.
Built from https://develop.svn.wordpress.org/trunk@44162


git-svn-id: http://core.svn.wordpress.org/trunk@43992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:41:57 +00:00
desrosj e12094d02f Build tools: Build webpack dev in grunt build.
For the WordPress zip we need both the minified and non-minified files. This is because of `SCRIPT_DEBUG`. So in grunt build we need to do both `grunt webpack:prod` and `grunt webpack:dev`.

Props bordoni, atimmer.

Merges [43817] to trunk.

Fixes #45156.
Built from https://develop.svn.wordpress.org/trunk@44161


git-svn-id: http://core.svn.wordpress.org/trunk@43991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:36:51 +00:00
desrosj ed941d9ed4 General: Fix some code formatting issues.
A handful of code formatting issues were introduced in [44159], runs the auto-fixer on them.
Built from https://develop.svn.wordpress.org/trunk@44160


git-svn-id: http://core.svn.wordpress.org/trunk@43990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:35:40 +00:00
Gary Pendergast e4b570f8fb Build Tools: Copy package JavaScript and CSS into `wp-includes`.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Merges [43760] from the 5.0 branch to trunk.

Props atimmer, pento.
Fixes #45119.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:11:47 +00:00
desrosj feb27516d0 Themes: Document the new theme features being added.
The add_theme_support() inline docs now includes the features that the block editor adds.

Props pento, desrosj.

Merges [43814] to trunk.

Fixes #45134.
Built from https://develop.svn.wordpress.org/trunk@44158


git-svn-id: http://core.svn.wordpress.org/trunk@43988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:41:37 +00:00
desrosj 102b13cdb9 Styles: Add helper functions for loading block styles.
Blocks are able to register styles that used in the editor and the frontend, or only in the editor. These functions ensure the correct styles are loaded in the correct place.

Props pento.

Merges [43812] to trunk.

See #45065.
Built from https://develop.svn.wordpress.org/trunk@44157


git-svn-id: http://core.svn.wordpress.org/trunk@43987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:36:38 +00:00
Gary Pendergast e740c695e6 KSES: Allow the `download` attribute on `<a>` tags.
To avoid this being a vector for bypassing the filetypes that are allowed to be uploaded, this attribute is only allowed to be added without a value.

Merges [43813] from the 5.0 branch to trunk.

Props kalpshit, arshidkv12, welcher, peterwilsoncc, marina_wp, pento.
Fixes #44724.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:28:38 +00:00
Gary Pendergast 9c8a29c889 General: Fix some code formatting issues.
A handful of code formatting issues were introduced in recent commits, runs the auto-fixer on them.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:25:40 +00:00
Gary Pendergast c925b89152 Embeds: Filter HTML response in oEmbed proxy controller.
Adapts the response from `WP_oEmbed_Controller::get_proxy_item()` so that the response is correctly filtered and embeds work properly in JavaSccript editors. Introduces new `get_oembed_response_data_for_url()` function for preparing internal oEmbed responses.

Merges [43810] from the 5.0 branch to trunk.

Props danielbachhuber, imath, swissspidy.
Fixes #45142.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:20:37 +00:00
desrosj dd7e2243fa Meta: Allow empty strings to be set by Custom Fields meta box.
Because the REST API allows meta keys to have empty values, the Custom Fields meta box should permit the same behavior.

Props charlestonsw, soulseekah, danielbachhuber.

Merges [43811] to trunk.

Fixes #43559.
Built from https://develop.svn.wordpress.org/trunk@44153


git-svn-id: http://core.svn.wordpress.org/trunk@43983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 03:17:38 +00:00
desrosj 4d3f9732b1 Bundled Themes: Expand initial block editor support.
A handful of items were missed when adding initial support for the new block editor to bundled themes in [43793]-[43800]. This adds support for those missed items.

Props pento, davidakennedy, laurelfulford.

Merges [43869], [43870], [43871], [43872], [43873], [43874], [43875], [43876] to trunk.

Fixes #45238, #45239, #45240, #45242, #45243, #45244, #45245, #45246.
Built from https://develop.svn.wordpress.org/trunk@44152


git-svn-id: http://core.svn.wordpress.org/trunk@43982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:55:39 +00:00
Gary Pendergast 5e62e6b203 Bundled Themes: Make twentynineteen the default theme.
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.

Merges [43809,43954] from the 5.0 branch to trunk.

Fixes #45152.
Props jorbin, SergeyBiryukov, pento, mcsf.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:49:38 +00:00
Jeremy Felt c3e927d2c8 REST API: Add endpoints for blocks.
`WP_REST_Block_Renderer_Controller` allows rendering of server-side rendered blocks, whilst `WP_REST_Blocks_Controller` allows retrieving of reusable blocks.

Merges [43805] and [43806] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, pento, Presskopp, swissspidy.
See #45065, #45098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:35:38 +00:00
Gary Pendergast 5432b8e055 Default Themes: Import Twenty Nineteen from the 5.0 branch.
Merges [43808,43821,43842,43860,43892,43904,43909,43926-43929,43956,43961-43963] from the 5.0 branch to trunk.

Props allancole, karmatosed, kjellr, yingling017, mrasharirfan, milana_cap, fabiankaegy, westonruter, jorbin, netweb, b-07, khleomix, audrasjb, nielslange, mmaumio, richsalvucci, littlebigthing, dimadin, joyously, anevins, peterwilsoncc, dannycooper, iCaleb, siriokun, technosiren, travel_girl, azchughtai, ianbelanger, nadim1992, ismailelkorchi, nativeinside, chetan200891, grapplerulrich, ocean90, joshfeck, frankew, AbdulWahab610, mendezcode, eliorivero, melchoyce, joen, laurelfulford, mdawaffe, kraftbj, dsmart, nao, mayukojpn, enodekciw, ketuchetan, atanasangelovdev, poena, sharaz, artisticasad, mukesh27, burhandodhy, crunnells, aprakasa, themeroots, imonly_ik, tlxo, youthkee, brentswisher, smyoon315, mrahmadawais, desideveloper, Kau-Boy, mor10, mikeyarce, dingo_bastard, xkon, twoabove.

Fixes #45424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:33:41 +00:00
desrosj 39a7f9a6d7 Twenty Seventeen: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Seventeen.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end. 

Props laurelfulford, ianbelanger, crunnells, davidkennedy.

Merges [43800] to trunk.

Fixes #45045.
Built from https://develop.svn.wordpress.org/trunk@44148


git-svn-id: http://core.svn.wordpress.org/trunk@43978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:22:37 +00:00
desrosj d30ab8fc85 Twenty Sixteen: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Sixteen.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props laurelfulford, davidkennedy.

Merges [43799] to trunk.

Fixes #45044.
Built from https://develop.svn.wordpress.org/trunk@44147


git-svn-id: http://core.svn.wordpress.org/trunk@43977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:18:37 +00:00
Jeremy Felt 3af9743b81 Blocks: Add the reusable block post type, `wp_block`.
Merges [43804] from the 5.0 branch to trunk.

See #45098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:15:37 +00:00
desrosj 9bbc000c65 Twenty Fifteen: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fifteen.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props laurelfulford, davidkennedy.

Merges [43798] to trunk.

Fixes #45043.
Built from https://develop.svn.wordpress.org/trunk@44145


git-svn-id: http://core.svn.wordpress.org/trunk@43975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:13:38 +00:00
desrosj f6fafb8f3c Twenty Fourteen: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fourteen.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props laurelfulford, crunnells, ianbelanger, davidkennedy.

Merges [43797] to trunk.

Fixes #45042.
Built from https://develop.svn.wordpress.org/trunk@44144


git-svn-id: http://core.svn.wordpress.org/trunk@43974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:04:37 +00:00
Gary Pendergast 63ac8f65d8 Script Loader: Fix metadata being registered as an inline script.
[43723] included script metadata for the `wp-polyfill` script that was being registered as an inline script.

Merges [43802] from the 5.0 branch to trunk.

See #45065.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:02:37 +00:00
desrosj 76c23f00ff Twenty Thirteen: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Thirteen.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
- Add theme support and styles for `align-wide`, to allow wide and full alignment styles on the blocks. 

Props laurelfulford, ianbelanger, davidkennedy.

Merges [43796] to trunk.

Fixes #45041.
Built from https://develop.svn.wordpress.org/trunk@44142


git-svn-id: http://core.svn.wordpress.org/trunk@43972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:59:38 +00:00
Jeremy Felt fe31e0adc5 Meta Boxes: Sync checks for valid meta boxes from `do_meta_boxes()` to `the_block_editor_meta_boxes()`.
Merges [43792] from the 5.0 branch to trunk.

Props ocean90.
See #45112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:56:17 +00:00
desrosj cee266f5a7 Twenty Twelve: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Twelve.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props ianbelanger, crunnells, laurelfulford, davidakennedy.

Merges [43795] to trunk.

Fixes #45040.
Built from https://develop.svn.wordpress.org/trunk@44140


git-svn-id: http://core.svn.wordpress.org/trunk@43970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:55:38 +00:00
desrosj c41dede996 Twenty Eleven: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Eleven.

These are the specific changes made to this theme:

- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props ianbelanger, laurelfulford, davidakennedy.

Merges [43794] to trunk.

Fixes #45039.
Built from https://develop.svn.wordpress.org/trunk@44139


git-svn-id: http://core.svn.wordpress.org/trunk@43969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:51:38 +00:00
Jeremy Felt c339798b49 Themes: Introduce responsive embeds support.
Responsive embeds is a way for a theme to opt in to WordPress dynamically scaling the width/height of an embed. When a theme supports responsive embeds, a `wp-embed-responsive` class is added to the `<body>` tag. This information is also presented through the REST API for clients to respect.

Merges [43790] and [43791] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, ocean90.
Fixes #45125.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:50:37 +00:00
desrosj 5e1e612528 Twenty Ten: Add styles and support for the new block-based editor.
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Ten.

These are the specific changes made to this theme:

- Add blocks.css, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. 

Props nielslange, crunnells, laurelfulford, davidakennedy.

Merges [43793] to trunk.

Fixes #45038.
Built from https://develop.svn.wordpress.org/trunk@44137


git-svn-id: http://core.svn.wordpress.org/trunk@43967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:46:38 +00:00
Gary Pendergast 1947e4424a KSES: Allow `url()` to be used in inline CSS.
The cover image block uses the `url()` function in its inline CSS, to show the cover image. KSES didn't allow this, causing the block to not save correctly for Author and Contributor users. As KSES does already check each attribute name against an allowed list, we're able to add an extra check for certain attributes to be able to use the `url()` function, too.

Merges [43781] from the 5.0 branch to core.

Props peterwilsoncc, azaozz, pento, dd32.
Fixes #45067.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:41:36 +00:00
Jeremy Felt d45126977e Build: Ignore the vendor directory during the jsvalidate:build task.
Merges [43783] from the 5.0 branch to trunk.

Props netweb.
Fixes #45119.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:38:38 +00:00
Jeremy Felt f93e24ca8e REST API: Render response in user locale with `?_locale=user`.
Introduces new `determine_locale()` function for deciding the proper locale to use for a response. Default value is `get_user_locale()` in the admin, and `get_locale()` on the frontend. Because REST API requests are considered frontend requests, `?_locale=user` can be used to render the response in the user's locale.

Also updates `wp-login.php?wp_lang` implementation to benefit from this abstraction.

Merges [43776] from the 5.0 branch to trunk.

Props flixos90, mnelson4, swissspidy, TimothyBlynJacobs.
Fixes #44758.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:32:39 +00:00
Gary Pendergast 313bc3fc73 Block Editor: Add extra body classes when the block editor is loaded.
Merges [43780] from the 5.0 branch to trunk.

See #45037.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:21:38 +00:00
Gary Pendergast daaf15cb09 Meta Boxes: Add `__back_compat_meta_box` and `__block_editor_compatible_meta_box` flags to meta boxes.
When meta boxes are registered, they can use the `__back_compat_meta_box` and `__block_editor_compatible_meta_box` flags, to show whether this registration just exists for if the classic editor is loaded, and whether this meta box is compatible with the block editor.

When a meta box marks itself as incompatible with the block editor, and `WP_DEBUG` is enabled, a warning will show inside that meta box in the classic editor.

As all core meta boxes have been recreated in the block editor, they can be marked with the `__back_compat_meta_box` flag.

Merges [43779] from the 5.0 branch to trunk.

See #45112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:18:38 +00:00
Gary Pendergast a119d4561e Block Editor: Add helper functions to collect meta box information.
To allow the block editor to render meta boxes, it needs to collect information about how those meta boxes are registered, and format it for the block editor to make use of.

Merges [43778] from the 5.0 branch to trunk.

See #45112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:11:37 +00:00
Gary Pendergast 74e7094bd0 Block Editor: Add an `is_block_editor()` method to `WP_Screen`.
This method allows checking (or setting) whether the block editor is loading on the current screen.

Merges [43777] from the 5.0 branch to trunk.

See #45037.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:08:38 +00:00
Gary Pendergast 786eb29de1 Revisions: Improve performance of `WP_Text_Diff_Renderer_Table`.
`WP_Text_Diff_Renderer_Table` is used to generate the diff view in revisions, but there were some cases that could cause it to take excessive amounts of time to run.

Some noteable cases include:
- When a large number of new lines were inserted in the middle of the post from one revision to the next.
- When both revisions contain >100 lines.
- When either revision contains a lot of long lines.

In one extreme test case, the diff view took over a minute to generate. With this change, it now takes less than a second.

Merges [43775] from the 5.0 branch to trunk.

Fixes #35667.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:04:36 +00:00
Jeremy Felt b91caddc1d REST API: Restore Autosaves controller test for multisite.
PHPUnit 3.6.x requires `exclude` and `file` paths to be relative to the checkout root.

PHPUnit 4.0.0+ requires the paths to be relative to the configuration file.

Merges [43774] from the 5.0 branch to trunk.

See #45131.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 00:58:37 +00:00
Gary Pendergast 423c828330 REST API: Include `block_version` on Post `content` object.
The `block_version` denotes which version of Blocks the `post_content` contains. Introduces new `block_version()` function for versioning Blocks.

Merges [43770] from the 5.0 branch to trunk.

Props danielbachhuber, birgire.
Fixes #43887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 00:55:37 +00:00
desrosj d4d16ec083 REST API: Introduce Autosaves controller and endpoint.
- Adds `WP_REST_Autosaves_Controller` which extends `WP_REST_Revisions_Controller`.
- Autosaves endpoint is registered for all post types except attachment because even post types without revisions enabled are expected to autosave.
- Because setting the `DOING_AUTOSAVE` constant pollutes the test suite, autosaves tests are run last. We may want to improve upon this later. 

Also, use a truly impossibly high number in User Controller tests. The number `100`, (or `7777` in `trunk`), could be valid in certain test run configurations. The `REST_TESTS_IMPOSSIBLY_HIGH_NUMBER` constant is impossibly high for this very reason.

Finally, Skip Autosaves controller test for multisite. There's a PHP 5.2 edge case where paths calculated differently, possibly caused by differing version of PHPUnit.

Props adamsilverstein, aduth, azaozz, danielbachhuber, rmccue, danielbachhuber.

Merges [43767], [43768], [43769] to trunk.

See #45132, #45131.
Fixes #45128, #43316.
Built from https://develop.svn.wordpress.org/trunk@44126


git-svn-id: http://core.svn.wordpress.org/trunk@43956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:42:38 +00:00
desrosj e125a29326 Upgrade/Install: Deactivate Gutenberg plugin on update to 5.0.
Props mcsf.

Merges [43765] to trunk.

Fixes #45123.
Built from https://develop.svn.wordpress.org/trunk@44125


git-svn-id: http://core.svn.wordpress.org/trunk@43955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:27:04 +00:00
desrosj 85eb073748 i18n: Remove some translation domains accidentally included in [43762], [44122].
Moves [43764] to trunk.

Fixes #45110.
Built from https://develop.svn.wordpress.org/trunk@44124


git-svn-id: http://core.svn.wordpress.org/trunk@43954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:26:27 +00:00
desrosj d16e6740d5 REST API: Introduce the `rest_preload_api_request()` function.
This function helps perform multiple REST API requests, for the purpose of preloading data into a page.

Props pento.

Merges [43763] to trunk.

See #45110.
Built from https://develop.svn.wordpress.org/trunk@44123


git-svn-id: http://core.svn.wordpress.org/trunk@43953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:25:49 +00:00
desrosj 13226b445e Block Editor: Add helper functions for displaying the editor.
`use_block_editor_for_post()` and `use_block_editor_for_post_type()` determine if the block editor should be loaded.

`get_block_categories()` and `get_block_editor_server_block_settings()` provide data be included while the block editor is loading.

Props pento.

Merges [43762] to trunk.

See #45110.
Built from https://develop.svn.wordpress.org/trunk@44122


git-svn-id: http://core.svn.wordpress.org/trunk@43952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:25:11 +00:00
desrosj cf6e69ee9f General: Extract the code editor settings from `wp_enqueue_code_editor()`.
They're now returned by a new function, `wp_get_code_editor_settings()`, so they can be reused by the block editor.

Props pento.

Merges [43761] to trunk.

Fixes #45127.
Built from https://develop.svn.wordpress.org/trunk@44121


git-svn-id: http://core.svn.wordpress.org/trunk@43951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:24:33 +00:00
desrosj 94ffe0db5d Classic Editor: Disable the wpautop TinyMCE plugin on block posts.
As the block editor adds its own `<p>` tags, disabling the wpautop stops the classic editor from removing them.

Props pento.

Merges [43758] to trunk.

See #45113.
Built from https://develop.svn.wordpress.org/trunk@44120


git-svn-id: http://core.svn.wordpress.org/trunk@43950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:23:55 +00:00
desrosj 6d620cd5e5 Script loading: Fix regression after [43738].
After [43738], TinyMCE would be loaded earlier than before, which makes filters run at a different time relative to the loading of TinyMCE. Fix this by calling `wp_print_scripts` at the location where TinyMCE would previously be inserted as a `<script>` tag in the page.

Also, an TinyMCE translation related `<script>` that was mistakenly removed in [44115].

Props azaozz, omarreiss, swisspidy, atimmer.

Merges [43753], [43754] to trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44119


git-svn-id: http://core.svn.wordpress.org/trunk@43949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:23:17 +00:00
desrosj c2f3636e4a Blocks: Parse blocks when displaying posts.
Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

Props pento.

Merges [43752] to trunk.

See #45109.
Built from https://develop.svn.wordpress.org/trunk@44118


git-svn-id: http://core.svn.wordpress.org/trunk@43948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:22:38 +00:00
desrosj 04340ab0ec PHPCS: Fix errors.
Fixes errors introduced in [44116].
Built from https://develop.svn.wordpress.org/trunk@44117


git-svn-id: http://core.svn.wordpress.org/trunk@43947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:52:37 +00:00
desrosj 24f247267f Blocks: Introduce the block parser.
The `WP_Block_Parser` class, and the accompanying `parse_blocks()` helper function, can be used to parse an array of blocks out of a content string.

`WP_Block_Parser` is copied from the `@wordpress/block-serialization-default-parser` package. To ensure it stays in sync with the JavaScript parser, changes should be implemented in the package first, then the package version should be upgraded to include the changes.

Props pento.

Merges [43751] to trunk.

See #45109.
Built from https://develop.svn.wordpress.org/trunk@44116


git-svn-id: http://core.svn.wordpress.org/trunk@43946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:40:39 +00:00
desrosj 5db34748e6 Script loader: Adjust JS packages registration.
Adjusts the packages registration after [43723]:

    Combine the different registration functions into one `wp_default_packages` function. To reach this goal move the prefix logic into a function so it can be called from different locations. Use a static variable there to prevent duplicate inclusion of `version.php`.

    Call this function from the `wp_default_scripts` action by registering it as a default filter.

    Combine some of the logic in `_WP_Editors::print_tinymce_scripts` into `wp_register_tinymce_scripts`. The logic to force an uncompressed TinyMCE script file stays in `_WP_Editors::force_uncompressed_tinymce` because that logic is very specific to the classic editor.

    The script handle `wp-tinymce` is now a dependency of the editor script handle. In combination with the previous item, this makes the classic editor work.

    Adjust the syntax of the script paths to be more consistent with other WordPress code.

    Always use "production" mode for the media files to prevent people from inadvertently committing development files.

Props pento, omarreiss, atimmer.

Merges [43738] into trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44115


git-svn-id: http://core.svn.wordpress.org/trunk@43945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:27:38 +00:00
desrosj 4862c4aa96 Script loader: Register `@wordpress` scripts.
This allows the packages to be consumed by plugins and core itself.
The code has been based on the work done in the Gutenberg plugin.

We've added an array with all the packages and the vendor packages to
loop through. This sets a convention so all packages will be
registered in the same way. This array can eventually be generated by
a webpack plugin.

We need to register TinyMCE explicitly. Previously TinyMCE was used
by inserting custom `<script>` tags into the relevant admin pages.
This is not suitable for the new editor, so we need to explicitly
register TinyMCE. We could, in the future, refactor the custom
`<script>` tags to use the registered TinyMCE script instead.

Polyfills are inserted into the page only when necessary using
`document.write`.

Props omarreiss, herregroen, youknowriad, gziolo, atimmer.

Merges [43723] to trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44114


git-svn-id: http://core.svn.wordpress.org/trunk@43944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 16:50:36 +00:00
desrosj 4e57c6f941 REST API: Slash existing meta values when comparing with incoming meta upates.
When comparing the old and new values for a meta key being set, ensure both values are sanitized using the same logic so that equal values match.

props boonebgorges, dcavins, MattGeri, pilou69, TimothyBlynJacobs, kadamwhite.

Merges [43740] to trunk.

Fixes #42069.
Built from https://develop.svn.wordpress.org/trunk@44113


git-svn-id: http://core.svn.wordpress.org/trunk@43943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 16:30:37 +00:00
atimmer 8614d14887 Build tools: Build @wordpress packages with webpack.
We decided to split the media webpack config into it's own file. The
main webpack config then combines this file with the packages config.

Include vendor scripts by copying them. We copy the minified files if
they are available. If they aren't available we minify the original
files ourselves.

Props omarreiss, herregroen, gziolo, youknowriad, netweb, adamsilverstein.
Merges [43719] to trunk.
See #45065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 15:26:42 +00:00
atimmer 4f9ba9044e Build tools: Upgrade webpack to version 4.
* Minification is done by uglify, so disable that in the media build.
* The webpack boilerplate has changed, which explains the changes in the build files.
* ModuleConcatenationPlugin is enable by default for production builds so we don't have to specify that ourselves.

Merge notes: In `trunk` uglify isn't run on the media files after webpack, so webpack does need to do that. Newer webpack versions use `terser-webpack-plugin` as the default minification. Use the `uglifyjs-webpack-plugin` plugin to maintain the same behavior as before. We can look into terser as a minifier later.

Merges [43688] to trunk.
See #45065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 11:05:25 +00:00