Commit Graph

27503 Commits

Author SHA1 Message Date
Boone Gorges 7c56b972cc Improve `do_enclose()` logic on post publish.
Removing the direct SQL query in `do_all_pings()` improves filterability.

As part of this change, the signature of `do_enclose()` is changed so that
a null `$content` parameter can be passed, with the `$content` then inferred
from the `$post` passed in the second parameter. In addition, the second
parameter was modified so that a post ID or a `WP_Post` object can be
provided. These changes make it possible to trigger enclosure checks with
a post ID alone (as in `do_all_pings()`) and also brings the function
signature in line with `do_trackbacks()` and `pingback()`.

Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
See #36824.
Built from https://develop.svn.wordpress.org/trunk@46175


git-svn-id: http://core.svn.wordpress.org/trunk@45987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:49:56 +00:00
Andrew Ozz 463e050b25 Uploads: add helper functions for setting, getting, and deleting the temp upload reference used to the attachment_id when retrying to make image sub-sizes.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46174


git-svn-id: http://core.svn.wordpress.org/trunk@45986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:26:55 +00:00
Andrew Ozz 308e616baf TinyMCE: update to version 4.9.6. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt. Includes fix for the `Permission denied to access property "nodeType"` error.
Fixes #47437.
Built from https://develop.svn.wordpress.org/trunk@46173


git-svn-id: http://core.svn.wordpress.org/trunk@45985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:00:57 +00:00
whyisjake 471cf58049 Add SMS to the list of allowed protocols.
This commit expands the list of allowed protocols. It adds the `sms://` which can be used to open meessaging clients for mobile users.

Props rilwis, kraftbj

Fixes #39415

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


git-svn-id: http://core.svn.wordpress.org/trunk@45984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 23:38:55 +00:00
Sergey Biryukov 44b49c6fc3 Script Loader: Move the `current_theme_supports()` check above the `wp_default_(scripts|styles)` action, for consistency.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46171


git-svn-id: http://core.svn.wordpress.org/trunk@45983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:42:55 +00:00
Sergey Biryukov e9b6e9619e Script Loader: Only check current theme's HTML5 support for scripts and styles on front end.
Avoids a fatal error in the admin if `SCRIPT_DEBUG` is disabled.

Props azaozz.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46170


git-svn-id: http://core.svn.wordpress.org/trunk@45982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:34:56 +00:00
whyisjake 16c9095e33 Accesibility: Replace wp-a11y.js with @wordpress/a11y package
Continuation of [46167]. This fixes the tests that ended up broken following the previous commit.

We've extracted wp-includes/wp-a11y.js to a reusable package wordpress/a11y which is published on NPM. Let's make sure this package is also 
used in WordPress core. Once all the JavaScript is built using webpack, we can also import this package wherever it is used and configure 
webpack to load is an external.

Props, garrett-eclipse

Fixes #45066


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


git-svn-id: http://core.svn.wordpress.org/trunk@45981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:30:55 +00:00
Andrea Fercia c4267f663c Media: remove leftover test string change after [45499].
Props imath, audrasjb.
Fixes #48067.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 19:33:54 +00:00
whyisjake 08a077658d Accessibility: Replace wp-a11y.js with @wordpress/a11y package
We've extracted wp-includes/wp-a11y.js to a reusable package wordpress/a11y which is published on NPM. Let's make sure this package is also used in WordPress core. Once all the JavaScript is built using webpack, we can also import this package wherever it is used and configure webpack to load is an external.

Props omarreiss, herregroen, desrosj, ocean90, afercia, sstoqnov


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


git-svn-id: http://core.svn.wordpress.org/trunk@45979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 17:41:55 +00:00
Aaron Jorbin 9ed7b79387 External Library: Update getid3 to 1.9.18
Follow up to r46112 as getid3 has tagged an official release.

Changes: 00f3fbfd77...v1.9.18

Props desrosj, jkitchen.
Fixes #47751 #40883 #43836.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:54:57 +00:00
Sergey Biryukov 42d52ce080 Bundled Themes: Declare HTML5 support for scripts and styles.
Fixes #42804.
Built from https://develop.svn.wordpress.org/trunk@46165


git-svn-id: http://core.svn.wordpress.org/trunk@45977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:51:56 +00:00
Sergey Biryukov 252628652e Script Loader: Introduce HTML5 support for scripts and styles.
When a theme declares HTML5 support for script and styles via `add_theme_support( 'html5', array( 'script', 'style' ) )`, the `type="text/javascript"` and `type="text/css"` attributes are omitted.

These attributes are unnecessary in HTML5 and cause warnings in the W3C Markup Validation Service.

Props sasiddiqui, swissspidy, knutsp, SergeyBiryukov.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46164


git-svn-id: http://core.svn.wordpress.org/trunk@45976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:50:56 +00:00
Andrea Fercia 095805b5e6 Accessibility: Add `aria-current` to the Archives, Categories, and Recent Posts widgets output.
The `aria-current` attribute is a simple, effective, way to help assistive technology users orientate themselves within a list of items.

Continues the introduction in core of the `aria-current` attribute after [41359] and following changes.

Props audrasjb, melchoyce.
Fixes #47094.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 12:25:56 +00:00
John Blackbourn b4ac30c19c Docs: Improve docs for upload and `wp_die()` related functions.
See #47110 

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


git-svn-id: http://core.svn.wordpress.org/trunk@45974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 21:03:54 +00:00
desrosj 5a477b5715 Docs: Add missing descriptions for functions in `wp-admin/update-core.php`.
Also, fix the `@since` annotation added in [45480] to include the correct version.

Props SergeyBiryukov, ajayghaghretiya1.
Fixes #47424.
Built from https://develop.svn.wordpress.org/trunk@46161


git-svn-id: http://core.svn.wordpress.org/trunk@45973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 20:43:56 +00:00
desrosj a969ce8edf Posts, Post Types: Allow support arguments to be specified when registering post types.
The `add_post_type_support()` function accepts an optional third parameter that allows extra arguments to be supplied to configure post type support for a given feature. However, because of how `register_post_type()` and `WP_Post_Type->add_supports()` work, it is currently impossible to pass these additional arguments when initially registering a post type with `register_post_type()`.

This change makes it possible to supply additional arguments for a feature using the `supports` argument of `register_post_type()`.

Props MaximeCulea, seuser, desrosj, johnbillion.
Fixes #40413.
Built from https://develop.svn.wordpress.org/trunk@46160


git-svn-id: http://core.svn.wordpress.org/trunk@45972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 19:58:56 +00:00
desrosj d4928fb9cd Build/Test Tools: Improve test coverage for `wp_validate_boolean()`.
This change also reworks the test class to use a data provider.

Props pbearne, desrosj
Fixes #39868
Built from https://develop.svn.wordpress.org/trunk@46159


git-svn-id: http://core.svn.wordpress.org/trunk@45971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 18:49:55 +00:00
Adam Silverstein 3b1f90886c Build/Test Tools: fix source map loading in Firefox.
Fix an issue that prevented source maps from loading correctly in Firefox developer tools. Matches a fix introduced in Gutenberg build in PR:17024.

Props pierlo, andraganescu.
Fixes #47870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 17:27:55 +00:00
Adam Silverstein 0cb3860138 External Libraries: Update Backbone.js to 1.4.0.
Upgrade Backbone to the latest stable version. Fix some issues in Media with `listenTo` which changed in this version, see https://backbonejs.org/#changelog.

Props desrosj, priyankkpatel, pierlo.
Fixes #47478.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 17:19:54 +00:00
Sergey Biryukov 222b400a7d Docs: Correct accepted values for `search_columns` parameter in `WP_User_Query`.
Props meloniq.
Fixes #48057.
Built from https://develop.svn.wordpress.org/trunk@46156


git-svn-id: http://core.svn.wordpress.org/trunk@45968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 15:43:56 +00:00
desrosj 5329411f6d General: Ensure the arguments passed to `implode()` are in the correct order.
The `implode()` function accepts two. parameters, `$glue` and `$pieces`. For historical reasons, these parameters have been accepted in any order, though it was recommended that the documented order of `$glue, $pieces` be used.

Starting in PHP 7.4, specifying the parameters in the reverse order will trigger a deprecation notice with the plan to remove this tolerance in PHP 8.0.

This change fixes the occurrences of reversed arguments in Core with the exception of those contained in included external libraries. These will be handled separately.

Props jrf, jorbin.
See #47746.
Built from https://develop.svn.wordpress.org/trunk@46155


git-svn-id: http://core.svn.wordpress.org/trunk@45967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 13:40:57 +00:00
Sergey Biryukov b2a384461e Date/Time: Introduce `get_post_datetime()` to retrieve post published or modified time as a `DateTimeImmutable` object instance.
Introduce `get_post_timestamp()` to retrieve post published or modified time as a Unix timestamp.

Use `get_post_datetime()` in `get_post_time()` and `get_post_modified_time()` to return correct GMT time if default timezone is changed from UTC.

Props Rarst, johnregan3.
Fixes #25002.
Built from https://develop.svn.wordpress.org/trunk@46154


git-svn-id: http://core.svn.wordpress.org/trunk@45966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 11:14:54 +00:00
johnjamesjacoby 757d077669 Network Admin: Allow Sites to have filterable States in List Table rows.
This change introduces a new `site_states()` method to the Sites List Table class (with a new `display_site_states` filter inside of it) following the pattern popularized in other List Table classes before it (Posts, Media, etc...)

Fixes #37684. Props mnelson4, pbiron, jeremyfelt, johnjamesjacoby.
Built from https://develop.svn.wordpress.org/trunk@46153


git-svn-id: http://core.svn.wordpress.org/trunk@45965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 23:34:55 +00:00
Sergey Biryukov a1a5df805c Docs: Improve documentation for `get_bookmarks()`.
Props pbiron.
Fixes #48053.
Built from https://develop.svn.wordpress.org/trunk@46152


git-svn-id: http://core.svn.wordpress.org/trunk@45964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 19:55:56 +00:00
Sergey Biryukov a3e747990c Site Health: Add a link to "Debugging in WordPress" support article to fatal PHP error handler's default message.
Props garrett-eclipse, tobifjellner, dkarfa, hareesh-pillai.
Fixes #47681.
Built from https://develop.svn.wordpress.org/trunk@46151


git-svn-id: http://core.svn.wordpress.org/trunk@45963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 17:23:55 +00:00
Sergey Biryukov a86fde414b Docs: Improve `@return` value description for `wp_xmlrpc_server::minimum_args()`.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46150


git-svn-id: http://core.svn.wordpress.org/trunk@45962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 16:32:55 +00:00
Sergey Biryukov a86711e28e Code Modernisation: Remove redundant PHP 4 code from `do_action()`.
As of PHP 5, objects are always passed by reference, so this has not been needed for quite some time.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46149


git-svn-id: http://core.svn.wordpress.org/trunk@45961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 14:48:54 +00:00
Sergey Biryukov dc305e9e0a XML-RPC: Avoid a PHP warning in `wp_xmlrpc_server::minimum_args()` if `$args` is not an array.
Correct the documentation to clarify that array is the only acceptable type for `$args`.

Props bitcomplex, dkarfa.
Fixes #48046.
Built from https://develop.svn.wordpress.org/trunk@46148


git-svn-id: http://core.svn.wordpress.org/trunk@45960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 09:58:56 +00:00
Sergey Biryukov 1060f7e167 Widgets: Introduce `register_sidebar_defaults` filter for default arguments in `register_sidebar()`.
Props patilvikasj, powerbuoy.
Fixes #48033.
Built from https://develop.svn.wordpress.org/trunk@46147


git-svn-id: http://core.svn.wordpress.org/trunk@45959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 09:13:54 +00:00
Sergey Biryukov f3f1d530f4 Code Modernisation: Simplify some logic in `apply_filters()`.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46146


git-svn-id: http://core.svn.wordpress.org/trunk@45958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 12:04:55 +00:00
Sergey Biryukov 3b43f6dfbf Code Modernisation: Replace `call_user_func_array()` in `tests/phpunit/tests/db.php` with dynamic function calls.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46145


git-svn-id: http://core.svn.wordpress.org/trunk@45957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:56:54 +00:00
Sergey Biryukov e6bbff13c5 Code Modernisation: Replace `call_user_func_array()` in various `__call()` methods with dynamic function calls.
The callback in these functions is always checked against a limited list of valid callbacks that can be safely changed to dynamic function calls.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46144


git-svn-id: http://core.svn.wordpress.org/trunk@45956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:53:56 +00:00
Sergey Biryukov 2a35b3e7df Code Modernisation: Replace `call_user_func_array()` in `wp-includes/class-wp-walker.php` with dynamic function calls.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46143


git-svn-id: http://core.svn.wordpress.org/trunk@45955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:50:55 +00:00
Sergey Biryukov 3daef6260b Code Modernisation: Replace `call_user_func_array()` in `wp-cron.php` with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46142


git-svn-id: http://core.svn.wordpress.org/trunk@45954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:48:54 +00:00
Sergey Biryukov c32fb1dbee Code Modernisation: Remove redundant call to `func_get_arg()` in `wp-includes/class-wp-rewrite.php`.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46141


git-svn-id: http://core.svn.wordpress.org/trunk@45953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:47:54 +00:00
Sergey Biryukov 92ba2cc95d Code Modernisation: Remove redundant calls to `func_get_arg()` in `wp-includes/class-wp-admin-bar.php`.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46140


git-svn-id: http://core.svn.wordpress.org/trunk@45952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:46:54 +00:00
Sergey Biryukov 60f027a378 Code Modernisation: Replace `call_user_func_array()` in combination with an empty array in `wp-includes/class-wp-hook.php` with `call_user_func()`.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46139


git-svn-id: http://core.svn.wordpress.org/trunk@45951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:45:56 +00:00
Sergey Biryukov 8ee3790851 Code Modernisation: Replace `call_user_func_array()` in `wp-admin/includes/widgets.php` and associated unit tests with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46138


git-svn-id: http://core.svn.wordpress.org/trunk@45950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:41:55 +00:00
Sergey Biryukov f166554882 Code Modernisation: Replace `call_user_func_array()` in `wp-admin/includes/template.php` with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46137


git-svn-id: http://core.svn.wordpress.org/trunk@45949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:35:56 +00:00
Sergey Biryukov 7c370fa9d0 Code Modernisation: Replace `call_user_func_array()` in `wp-admin/includes/ajax-actions.php` with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46136


git-svn-id: http://core.svn.wordpress.org/trunk@45948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:34:57 +00:00
Sergey Biryukov 4bcec84309 Code Modernisation: Replace `call_user_func_array()` in `wp-includes/post-template.php` with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46135


git-svn-id: http://core.svn.wordpress.org/trunk@45947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:32:54 +00:00
Sergey Biryukov 4b3df8e846 Code Modernisation: Replace `call_user_func_array()` in `wp-includes/nav-menu-template.php` with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46134


git-svn-id: http://core.svn.wordpress.org/trunk@45946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:31:57 +00:00
Sergey Biryukov 6e39938fb5 Code Modernisation: Replace `call_user_func_array()` in `wp-includes/class-wp-customize-*.php` with direct function calls in combination with the spread operator.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46133


git-svn-id: http://core.svn.wordpress.org/trunk@45945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:27:55 +00:00
Sergey Biryukov d55f1f81c7 Code Modernisation: Replace `call_user_func_array()` in `wp-includes/capabilities.php` with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46132


git-svn-id: http://core.svn.wordpress.org/trunk@45944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:23:56 +00:00
Sergey Biryukov 30fe3f5d4f Code Modernisation: Introduce the spread operator in `wp-admin/includes/media.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46131


git-svn-id: http://core.svn.wordpress.org/trunk@45943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:12:55 +00:00
Sergey Biryukov 7093392099 Code Modernisation: Introduce the spread operator in `wp-admin/includes/dashboard.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46130


git-svn-id: http://core.svn.wordpress.org/trunk@45942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:11:56 +00:00
Sergey Biryukov efe18c3604 Code Modernisation: Introduce the spread operator in `wp-includes/deprecated.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

While these functions are deprecated, they can still get a minor performance boost in case they are being called.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46129


git-svn-id: http://core.svn.wordpress.org/trunk@45941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:09:54 +00:00
Sergey Biryukov 6a039a5731 Code Modernisation: Introduce the spread operator in `wp-includes/formatting.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46128


git-svn-id: http://core.svn.wordpress.org/trunk@45940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:06:55 +00:00
Sergey Biryukov 9e2c6eb624 Code Modernisation: Introduce the spread operator in `tests/phpunit/*`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46127


git-svn-id: http://core.svn.wordpress.org/trunk@45939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:04:55 +00:00
Sergey Biryukov 7a6d74e28a Code Modernisation: Introduce the spread operator in `wp-includes/functions.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46126


git-svn-id: http://core.svn.wordpress.org/trunk@45938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:45:56 +00:00
Sergey Biryukov 340b7b53c8 Code Modernisation: Introduce the spread operator in `wp-admin/includes/class-*-upgrader-skin.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46125


git-svn-id: http://core.svn.wordpress.org/trunk@45937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:42:54 +00:00
Sergey Biryukov 300b14e1ca Code Modernisation: Introduce the spread operator in `wp-includes/class-wp-dependency.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46124


git-svn-id: http://core.svn.wordpress.org/trunk@45936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:36:56 +00:00
Sergey Biryukov 654f8a8677 Code Modernisation: Introduce the spread operator in `wp-includes/category-template.php`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46123


git-svn-id: http://core.svn.wordpress.org/trunk@45935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:33:55 +00:00
Sergey Biryukov 7322d3f35e Code Modernisation: Use the spread operator in `wp_register_sidebar_widget()`.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Missed in [45629].

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46122


git-svn-id: http://core.svn.wordpress.org/trunk@45934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:31:54 +00:00
Sergey Biryukov d46f9b4fb8 Coding Standards: Fix WPCS issue in [46120].
See #47820.
Built from https://develop.svn.wordpress.org/trunk@46121


git-svn-id: http://core.svn.wordpress.org/trunk@45933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 02:07:55 +00:00
Sergey Biryukov 7a3e224e8d Docs: Clarify in `update_option()` description that it's plugin author's responsibility to check the current user's capabilities before saving any option changes.
Props dinhtungdu, lllor.
Fixes #47820.
Built from https://develop.svn.wordpress.org/trunk@46120


git-svn-id: http://core.svn.wordpress.org/trunk@45932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 01:29:54 +00:00
Sergey Biryukov 142efedee0 Site Health: Show a more specific fatal error message when in Recovery Mode with headers already sent.
Props garrett-eclipse, TimothyBlynJacobs, mukesh27, marybaum, afragen, Clorith, mdwolinski, SergeyBiryukov.
Fixes #47321.
Built from https://develop.svn.wordpress.org/trunk@46119


git-svn-id: http://core.svn.wordpress.org/trunk@45931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 01:18:55 +00:00
Sergey Biryukov 8988c1ce38 Mail: Add a unit test to make sure `wp_mail()` does not duplicate the `MIME-Version` header added automatically by PHPMailer.
See #43542.
Built from https://develop.svn.wordpress.org/trunk@46118


git-svn-id: http://core.svn.wordpress.org/trunk@45930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 21:35:57 +00:00
Sergey Biryukov 8e29221da4 Bundled Themes: 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 birgire, superpoincare.
Fixes #47461. See #43857.
Built from https://develop.svn.wordpress.org/trunk@46117


git-svn-id: http://core.svn.wordpress.org/trunk@45929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 21:00:56 +00:00
Sergey Biryukov c5fe7878ec Coding Standards: Fix WPCS issue in [46115].
See #43542.
Built from https://develop.svn.wordpress.org/trunk@46116


git-svn-id: http://core.svn.wordpress.org/trunk@45928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 20:42:56 +00:00
Sergey Biryukov 18bf922527 Mail: Avoid setting duplicate `MIME-Version` and `X-Mailer` headers in `wp_mail()`, they are added automatically by PHPMailer.
Props lbenicio, junktrunk, danieltj, studyboi, bennemann.
Fixes #43542.
Built from https://develop.svn.wordpress.org/trunk@46115


git-svn-id: http://core.svn.wordpress.org/trunk@45927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 20:14:54 +00:00
Aaron Jorbin 232d97425c Build/Test Tools: add php info to travis output
Fixes #48041.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:28:55 +00:00
Aaron Jorbin ecd822a880 Comment out magic quote functions
Follow up to r46112.

See: #47751,#47783, #48040.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:23:55 +00:00
Aaron Jorbin 1ed691f574 Update getID3 library to fix issues with PHP7.4
Updates to trunk version that includes fixes for PHP7.4

Changelog:
https://github.com/JamesHeinrich/getID3/compare/v1.9.14...00f3fbfd77e583099ca70a3cf0bc092e113d2b20

See: #47751,#47783.
Fixes: #48040.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:07:57 +00:00
jorgefilipecosta b7fbf7d373 Block Editor: Backport block styles server functions from block editor.
This commit backports the block styles functionality added to the block editor in https://github.com/WordPress/gutenberg/pull/16356.

Props: youknowriad, aduth, swissspidy.
Fixes #48039.
Built from https://develop.svn.wordpress.org/trunk@46111


git-svn-id: http://core.svn.wordpress.org/trunk@45923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 18:21:54 +00:00
jorgefilipecosta 099eb0578e Block Editor: Add preloading of autosaves.
With the introduction of https://github.com/WordPress/gutenberg/pull/7945, the block editor requests autosave data when the editor is loaded. This can be optimized by preloading the request server-side and then passing the request data to the client using the preloading mechanism in editor-form-blocks.php.

Props: talldanwp, aduth.
Built from https://develop.svn.wordpress.org/trunk@46110


git-svn-id: http://core.svn.wordpress.org/trunk@45922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 16:47:54 +00:00
Sergey Biryukov 8316af9198 Bootstrap/Load: Allow charset to be passed to the `wp_die()` function.
Props mohsinrasool, spacedmonkey, socalchristina.
Fixes #46666.
Built from https://develop.svn.wordpress.org/trunk@46109


git-svn-id: http://core.svn.wordpress.org/trunk@45921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 15:42:56 +00:00
Sergey Biryukov 0863695da8 Coding Standards: Fix WPCS issue in [46107].
See #46631.
Built from https://develop.svn.wordpress.org/trunk@46108


git-svn-id: http://core.svn.wordpress.org/trunk@45920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 15:19:54 +00:00
Sergey Biryukov f9b87e88ba HTTP API: Add a unit test for `get_status_header_desc()`.
Props pbearne.
Fixes #46631.
Built from https://develop.svn.wordpress.org/trunk@46107


git-svn-id: http://core.svn.wordpress.org/trunk@45919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 14:54:56 +00:00
Sergey Biryukov 42079f34a9 Site Health: Modify the grading indicator to remove percentage score in favor of a "Good" or "Should be improved" status.
This removes arbitrary confusion about what the numbers mean.

Props Clorith, hedgefield, Cybr, arena, DavidAnderson, earnjam, daveshine, Otto42, azaozz, asadkn, KARTHOST, tigertech, maximejobin, johnbillion, raboodesign, ramiy, afragen.
Fixes #47046.
Built from https://develop.svn.wordpress.org/trunk@46106


git-svn-id: http://core.svn.wordpress.org/trunk@45918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 14:29:56 +00:00
Aaron Jorbin dd3ad3ac51 GENERAL: Remove magic quote functions
The path to magic quote sanity took a fun and exciting turn: PHP core removed it and WordPress updated the minimum version.

For the formally external pclzip, the code is commented out to make investigating easier and in case we ever need to merge upstream (if that still exists) changes.

Props ayeshrajans, jrf, jorbin.
See #47783.
Fixes #18322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 22:21:01 +00:00
desrosj 8a2bbf777a Correct the version number specified in [46102].
See #45361.
Built from https://develop.svn.wordpress.org/trunk@46104


git-svn-id: http://core.svn.wordpress.org/trunk@45916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 18:55:56 +00:00
Adam Silverstein a3eba2c201 Login and Registration: reset password - ensure submit button disabled when field empty.
Fix an issue where the submit button was enabled with an empty password when the user previously checked "Confirm use of weak password" for a weak password, then cleared the password field.

Props henry.wright.
Fixes #47924.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 18:30:55 +00:00
desrosj 7bbce99655 Menus: Nav menu locations should not be integers.
When nav menu location slugs are integers, some hard to debug results can occur. `register_nav_menus()` utilizes `array_merge()` which renumbers numeric indexes, starting from 0. Because of this, numeric menu locations will almost always be changed.

This change introduces a `_doing_it_wrong()` notice to inform developers that nav menu locations should always be strings.

Props audrasjb, desrosj, welcher.
Fixes #45361.
Built from https://develop.svn.wordpress.org/trunk@46102


git-svn-id: http://core.svn.wordpress.org/trunk@45914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 17:58:55 +00:00
Sergey Biryukov 55378bd295 REST API: Use correct parameter name in `rest_validate_value_from_schema()` error messages.
Props manzoorwanijk.
Fixes #47905.
Built from https://develop.svn.wordpress.org/trunk@46101


git-svn-id: http://core.svn.wordpress.org/trunk@45913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 03:06:55 +00:00
Adam Silverstein 67fd6e281f Multisite: improve `sites_pre_query` and `networks_pre_query` filters, avoiding db queries.
Improve the `pre_query` filters in multisite classes introduced in r44983. Return (non null) values immediately,
avoiding the database queries entirely, similar to other `pre_query` filters.

Props spacedmonkey, SergeyBiryukov, felipeelia.
Fixes #47599.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 22:17:55 +00:00
K. Adam White c148f0aa55 REST API: Accept string path in rest_ensure_request.
Update `rest_ensure_request()` to accept a string path, permitting a string path to be passed to `rest_do_request()` as is indicated (previously inaccurately) in that method's PHPDoc.

Props TimothyBlynJacobs, kadamwhite.
Fixes #40614.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 21:47:57 +00:00
K. Adam White 742ab2d68b REST API: Return term resources in "edit" context after PUT or POST request.
Props westonruter, dlh.
Fixes #41411.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 21:29:57 +00:00
Sergey Biryukov b987372d75 Mail: Update PHPMailer to 5.2.27.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.22...PHPMailer:v5.2.27

Props MattyRob, ayeshrajans, rogueresearch, bgermann, slaFFik, Presskopp, aaroncampbell.
Fixes #40472.
Built from https://develop.svn.wordpress.org/trunk@46097


git-svn-id: http://core.svn.wordpress.org/trunk@45909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 14:37:57 +00:00
Sergey Biryukov 3591f1ad60 Text Changes: Correct "up-to-date" vs. "up to date" usage in a database update string and inline comments.
* "Up to date" is an adverb phrase that describes an action that brings something in line with the latest information.
* "Up-to-date" is an adjective phrase that is used as a synonym for "current".

Props socalchristina, hareesh-pillai, garrett-eclipse, desrosj, aprea.
Fixes #38998.
Built from https://develop.svn.wordpress.org/trunk@46096


git-svn-id: http://core.svn.wordpress.org/trunk@45908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 13:06:57 +00:00
Sergey Biryukov cc6e23e4dc External Libraries: Update jQuery Color plugin to 2.1.2.
Props desrosj, hareesh-pillai, lovememore.
Fixes #31511.
Built from https://develop.svn.wordpress.org/trunk@46095


git-svn-id: http://core.svn.wordpress.org/trunk@45907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 12:41:54 +00:00
Sergey Biryukov b552f449db HTTP: Update the Root Certificate bundle.
Keep 1024-bit legacy root certificates re-added in [35919], except for those already expired, for compatibility with older OpenSSL versions.

Props skithund, paragoninitiativeenterprises.
Fixes #45807.
Built from https://develop.svn.wordpress.org/trunk@46094


git-svn-id: http://core.svn.wordpress.org/trunk@45906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 12:04:59 +00:00
Sergey Biryukov 877f356334 External Libraries: Revert [46092] pending test failure investigation.
See #45785.
Built from https://develop.svn.wordpress.org/trunk@46093


git-svn-id: http://core.svn.wordpress.org/trunk@45905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 10:19:59 +00:00
desrosj f7f27c37aa External Libraries: Update Underscore to 1.9.1.
Changes: https://github.com/jashkenas/underscore/compare/1.8.3...1.9.1

Props mukesh27, hareesh-pillai.
Fixes #45785
Built from https://develop.svn.wordpress.org/trunk@46092


git-svn-id: http://core.svn.wordpress.org/trunk@45904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 19:22:54 +00:00
desrosj abed60bb51 Editor: Add missing block data fields for blocks registered server side.
In [44122], the `styles` and `parent` block fields were omitted on accident. This change makes it possible to reuse them on the client.

Props gziolo.
Fixes #47017.
Built from https://develop.svn.wordpress.org/trunk@46091


git-svn-id: http://core.svn.wordpress.org/trunk@45903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 14:52:56 +00:00
Sergey Biryukov 5289afac9b Accessibility: Comments: In `comment_form()`, remove `aria-describedby` attribute from the email field if there's no associated description in the `comment_notes_before` argument.
The attribute is meant to communicate to user agents and assistive technologies that the element has a description. If the referenced description is missing, it will be flagged as failure by any automated accessibility checker tool and, most importantly, is potentially confusing for assistive technologies users.

Props afercia, joedolson, dinhtungdu, donmhico, SergeyBiryukov.
Fixes #47975.
Built from https://develop.svn.wordpress.org/trunk@46090


git-svn-id: http://core.svn.wordpress.org/trunk@45902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 01:51:54 +00:00
Sergey Biryukov 4d1761c881 Coding Standards: Fix WPCS issue in [46088].
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46089


git-svn-id: http://core.svn.wordpress.org/trunk@45901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 20:01:54 +00:00
Sergey Biryukov dcb08f0637 Docs: Fix placement of some duplicate hook references.
Hook documentation should be on the line directly above the line containing the `do_action()` or `apply_filters()` call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.
Built from https://develop.svn.wordpress.org/trunk@46088


git-svn-id: http://core.svn.wordpress.org/trunk@45900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:23:55 +00:00
Sergey Biryukov c9071ca2e6 Docs: Clarify the `int` return value in `comments_pre_query` filter DocBlock.
See #45800.
Built from https://develop.svn.wordpress.org/trunk@46087


git-svn-id: http://core.svn.wordpress.org/trunk@45899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:04:56 +00:00
Adam Silverstein b3e64f0947 Comments: add a new `comments_pre_query` filter to short circuit WP_Comment_Query 'get_comments' queries.
Return a non-null value to bypass WordPress's default comment queries.

Props felipeelia, spacedmonkey.
Fixes #45800.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 18:42:56 +00:00
Sergey Biryukov 49b4cfc034 Accessibility: Media: Replace `@` with `at` in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props audrasjb, afercia.
Fixes #47893.
Built from https://develop.svn.wordpress.org/trunk@46085


git-svn-id: http://core.svn.wordpress.org/trunk@45897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-09 00:07:57 +00:00
Sergey Biryukov 86a10090a0 Accessibility: Comments: Replace `@` with `at` in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47893.
Built from https://develop.svn.wordpress.org/trunk@46084


git-svn-id: http://core.svn.wordpress.org/trunk@45896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:53:55 +00:00
Sergey Biryukov f8ba775d7c Accessibility: Posts, Post Types: Replace `@` with `at` in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47832.
Built from https://develop.svn.wordpress.org/trunk@46083


git-svn-id: http://core.svn.wordpress.org/trunk@45895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:24:56 +00:00
Sergey Biryukov 0393a78206 Docs: Fix typo in `WP_Hook::resort_active_iterations()` description.
Props itowhid06.
Fixes #47999.
Built from https://develop.svn.wordpress.org/trunk@46082


git-svn-id: http://core.svn.wordpress.org/trunk@45894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 13:16:55 +00:00
Andrew Ozz c0b5127683 Upload: Reset the temp upload reference in Plupload when the file is not an image.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46081


git-svn-id: http://core.svn.wordpress.org/trunk@45893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 02:28:55 +00:00
Sergey Biryukov e26f739e53 Posts, Post Types: Revert [46079] pending test failure investigation.
See #47824.
Built from https://develop.svn.wordpress.org/trunk@46080


git-svn-id: http://core.svn.wordpress.org/trunk@45892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 19:33:55 +00:00
Sergey Biryukov 7828fe7e6a Posts, Post Types: Avoid a PHP warning when `the_content()` is called outside of the loop.
Fixes #47824.
Built from https://develop.svn.wordpress.org/trunk@46079


git-svn-id: http://core.svn.wordpress.org/trunk@45891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 14:33:56 +00:00
Andrew Ozz 2d6a772400 Fix "white spaces at end of line" in docblock (IDE) woes after [46077].
See #32437.
Built from https://develop.svn.wordpress.org/trunk@46078


git-svn-id: http://core.svn.wordpress.org/trunk@45890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 02:12:55 +00:00
Andrew Ozz 1de168e016 Media: Improve handling of cases where an uploaded image matches exactly a defined intermediate size. In most of these cases the original image has been edited by the user and is "web ready", there is no need for an identical intermediate image.
Introduces the `wp_image_resize_identical_dimensions` filter so plugins and themes can determine whether a new image with identical dimensions should be created, defaults to false.

Props wpdennis, HKandulla, galbaras, azaozz.
See #32437.
Built from https://develop.svn.wordpress.org/trunk@46077


git-svn-id: http://core.svn.wordpress.org/trunk@45889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 01:34:55 +00:00
Andrew Ozz dc8349ba0a Media: Add handling for "BIG" images. When the users upload a big image, typically a photo, scale it down to make it suitable for web use. Then use the scaled image as the "full" size, and keep the originally uploaded image for creating high quality sub-sizes in the future and in case the users want to download it later.
Introduces `wp_get_original_image_path()` that retrieves the path to the originally uploaded image in all cases, and `big_image_size_threshold` filter to set the pixel value above which images will be scaled. The same value is used as max-width and max-height when scaling.

See #47873.
Built from https://develop.svn.wordpress.org/trunk@46076


git-svn-id: http://core.svn.wordpress.org/trunk@45888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 01:07:55 +00:00
Andrew Ozz 630bad3a4f Uploads: Improve the error message shown when all attempts to create image sub-sizes fail.
Props afercia.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46075


git-svn-id: http://core.svn.wordpress.org/trunk@45887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 23:48:55 +00:00
whyisjake f4562e5516 Remove the extra call for wp-sanitize from the script loader.
Fixes #47986

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


git-svn-id: http://core.svn.wordpress.org/trunk@45885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 21:49:59 +00:00
Sergey Biryukov 699c6001fd Upgrade/Install: Escape the `%` in `width="100%"` in a `printf()` call in `Plugin_Upgrader_Skin::after()`.
Props afragen.
Fixes #47989.
Built from https://develop.svn.wordpress.org/trunk@46072


git-svn-id: http://core.svn.wordpress.org/trunk@45884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 06:26:56 +00:00
Sergey Biryukov c1e3b68b19 Docs: Improve documentation for `do_meta_boxes` action.
Props felipeelia, killua99, SergeyBiryukov.
Fixes #46542.
Built from https://develop.svn.wordpress.org/trunk@46071


git-svn-id: http://core.svn.wordpress.org/trunk@45883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 00:06:56 +00:00
Sergey Biryukov 6cab9557fb REST API: Mark `WP_REST_Users_Controller::update_current_item()` and `::delete_current_item()` as public.
Props dkarfa.
Fixes #47967.
Built from https://develop.svn.wordpress.org/trunk@46070


git-svn-id: http://core.svn.wordpress.org/trunk@45882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 23:18:55 +00:00
Sergey Biryukov 65747e3c91 Docs: Remove extra spaces in various REST API DocBlocks.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46069


git-svn-id: http://core.svn.wordpress.org/trunk@45881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 23:05:55 +00:00
Sergey Biryukov 7fb9cba55a Docs: Correct DocBlocks for `WP_REST_Posts_Controller::get_available_actions()` and `WP_REST_Revisions_Controller::get_parent()`.
Props dkarfa.
Fixes #47966.
Built from https://develop.svn.wordpress.org/trunk@46068


git-svn-id: http://core.svn.wordpress.org/trunk@45880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:59:54 +00:00
Andrew Ozz ee005d8fc5 Fix (unrelated) test after [46066].
See #43524.
Built from https://develop.svn.wordpress.org/trunk@46067


git-svn-id: http://core.svn.wordpress.org/trunk@45879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:53:56 +00:00
Andrew Ozz 3b976836a8 Media: Add two new intermediate image sizes, 1536px and 2048px. They are meant to enhance the way WordPress displays images on the front-end on larger, high-density devices. They make it possible to generate more suitable `srcset` and `sizes` attributes, and not use the original, often non-optimized image.
Also change the default `max_srcset_image_width` value to match the new max size.

Props pierlo, azaozz.
See #43524.
Built from https://develop.svn.wordpress.org/trunk@46066


git-svn-id: http://core.svn.wordpress.org/trunk@45878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:27:58 +00:00
Andrea Fercia 8fe3c3fa23 Widgets: Fix "jumpiness" when reordering widgets by dragging them.
Props ketanumretiya030, mukesh27, andraganescu, audrasjb.
Fixes #46941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:49:59 +00:00
Andrea Fercia 17652fb3d4 Widgets: Fix "jumpiness" when reordering widgets by dragging them.
Props ketanumretiya030, mukesh27, andraganescu, audrasjb.
Fixes #46941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:49:48 +00:00
Sergey Biryukov b9d4003d26 Coding Standards: Fix WPCS issue in [45990].
Built from https://develop.svn.wordpress.org/trunk@46019


git-svn-id: http://core.svn.wordpress.org/trunk@45830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:45:07 +00:00
desrosj 30ac675795 Fix for URL sanitization that can lead to cross-site scripting (XSS) attacks.
Props irsdl, sstoqnov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@45997


git-svn-id: http://core.svn.wordpress.org/trunk@45808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:52:56 +00:00
Sergey Biryukov 62b22b86a7 Improve handling the existing `rel` attribute in `wp_rel_nofollow_callback()`.
Props xknown, sstoqnov.
Built from https://develop.svn.wordpress.org/trunk@45990


git-svn-id: http://core.svn.wordpress.org/trunk@45801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:37:55 +00:00
whyisjake 90d9bdc54c Update wp.a11y.speak() to sanitize HTML before display.
Props iandunn, adamsilverstein, sstoqnov, peterwilsoncc

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


git-svn-id: http://core.svn.wordpress.org/trunk@45790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:13:21 +00:00
Sergey Biryukov c86ee39ff4 Improve URL validation in `wp_validate_redirect()`.
Props vortfu, whyisjake, peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@45971


git-svn-id: http://core.svn.wordpress.org/trunk@45782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:57:56 +00:00
Andrea Fercia 187d747198 Bundled Theme: Twenty Nineteen: Use human-friendly color names.
For better accessibility, the Primary and Secondary theme colors have now more understandable names.
Changes the names "Primary" and "Secondary" to "Blue" and "Dark Blue". Fallbacks to the `hex` color codes when the theme is set to use a custom Primary color.

Props kjellr, aduth, audrasjb.
Fixes #46698.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:47:10 +00:00
Andrea Fercia 8cb7918905 Bundled Theme: Twenty Nineteen: Fix the nesting of the `main` element.
The `main` element must not appear as a descendant of the `section` element. Correct markup is the first requirement to make user agents and assistive technologies work properly.

Changes the `<section>` element that was wrapping the `<main>` element to a `<div>`.

Props albertomake, ryelle, desrosj, ianbelanger, audrasjb.
Fixes #47066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:27:54 +00:00
Sergey Biryukov 761cd81a01 Escape the output in `wp_ajax_upload_attachment()`.
Props whyisjake, sstoqnov.
Built from https://develop.svn.wordpress.org/trunk@45936


git-svn-id: http://core.svn.wordpress.org/trunk@45747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:09:56 +00:00
whyisjake 50d33282c1 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Props vortfu, whyisjake, peterwilsoncc

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


git-svn-id: http://core.svn.wordpress.org/trunk@45746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:04:56 +00:00
Andrew Ozz e313498193 Uploads: After an image is uploaded and PHP times out or runs out of memory during post-processing (the server response is HTTP 500 error), try to resize it three more times. Then, if all attempts fail, do a cleanup of any sub-sizes that may have been created and show an error message asking the user to scale the image and upload it again.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@45934


git-svn-id: http://core.svn.wordpress.org/trunk@45745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 01:11:54 +00:00
Sergey Biryukov 97cbf72bf9 I18N: Fix typo in a function name in [45932].
See #44360.
Built from https://develop.svn.wordpress.org/trunk@45933


git-svn-id: http://core.svn.wordpress.org/trunk@45744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:57:54 +00:00
Sergey Biryukov e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Andrea Fercia 216838a0d2 Accessibility: Improve focus styles for legacy modal dialogs powered by jQuery UI.
Fixes #47944.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 21:49:55 +00:00
Andrea Fercia fbc9dba70b Accessibility: Audit usage of abbreviations.
Title attributes on abbreviations are only available to a minority of users. The
best option is to avoid unnecessary abbreviations when possible. In the other cases,
use an `<abbr>` element (which provides a hint to user agents on how to announce
and display the abbreviation) and provide an expansion in plain text on first use.

- `readme.html`: improves abbreviations and removes unnecessary `title` attributes
- options-general: removes unnecessary abbreviations and improves the remaining ones
- customizer schedule changeset date: removes unnecessary abbreviations and improves the remaining ones
- posts table date: uses a `span` element instead of an `abbr` element because this is not an abbreviation

Fixes #46980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 21:44:58 +00:00
Felix Arntz 4089fad5fb Formatting: Improve accuracy of `force_balance_tags()` and add support for custom element tags.
This changeset includes a major iteration on the regular expression used to balance tags, with comprehensive test coverage to ensure that all scenarios are supported or unsupported as expected.

Props dmsnell, westonruter, birgire.
Fixes #47014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 10:25:56 +00:00
Peter Wilson b55ca66759 #43590: Use robots meta tag to better discourage search engines.
This changes the "discourage search engines" option to output a `noindex, nofollow` robots meta tag. `Disallow: /` is removed from the `robots.txt` to allow search engines to discover they are requested not to index the site.

Disallowing search engines from accessing a site in the `robots.txt` file can result in search engines listing a site with a fragment (a listing without content).

Props donmhico, jonoaldersonwp.
Fixes #43590.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 02:27:55 +00:00
Sergey Biryukov 8662d9a74d I18N: Split translatable strings located on the same line preceded with a translator comment, where the first string needs that comment, but the second does not.
Props johnbillion.
See #44360.
Built from https://develop.svn.wordpress.org/trunk@45927


git-svn-id: http://core.svn.wordpress.org/trunk@45738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 00:43:55 +00:00
Sergey Biryukov 16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Andrea Fercia 3ab18dba93 Accessibility: Add a default title for the media modal dialog.
Makes sure the media modal dialog `h1` heading isn't empty when custom media frames don't set a title. This is particularly important now that the media modal is an ARIA dialog, as the title is referenced by an `aria-labelledby` attribute to properly label the dialog.

Props donmhico, audrasjb.
Fixes #47612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 15:18:56 +00:00
Sergey Biryukov 7fd6077864 Docs: Improve documentation for `auth_redirect()`.
Props atachibana.
Fixes #47956.
Built from https://develop.svn.wordpress.org/trunk@45924


git-svn-id: http://core.svn.wordpress.org/trunk@45735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 13:03:55 +00:00
Sergey Biryukov f447c32aca Twenty Nineteen: Remove unused jQuery argument passed to an IIFE that accepts no arguments.
Props Christian1012, hareesh-pillai.
Fixes #40333.
Built from https://develop.svn.wordpress.org/trunk@45923


git-svn-id: http://core.svn.wordpress.org/trunk@45734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:53:54 +00:00
Sergey Biryukov 4d7cc73e17 Twenty Seventeen: Remove unused jQuery argument passed to an IIFE that accepts no arguments.
Props Christian1012, hareesh-pillai.
See #40333.
Built from https://develop.svn.wordpress.org/trunk@45922


git-svn-id: http://core.svn.wordpress.org/trunk@45733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:52:56 +00:00
Sergey Biryukov ceefe26e9e Twenty Nineteen: Correct file name in JS DocBlocks.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45921


git-svn-id: http://core.svn.wordpress.org/trunk@45732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:43:55 +00:00
Sergey Biryukov c9d8c89ebd Twenty Nineteen: Improve compatibility with custom colors in the separator block.
Props kjellr.
Fixes #47811.
Built from https://develop.svn.wordpress.org/trunk@45920


git-svn-id: http://core.svn.wordpress.org/trunk@45731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 19:15:56 +00:00
Sergey Biryukov e30696bd20 Twenty Nineteen: Remove Baskerville Old Face from the font stack due to several shortcomings:
* Being difficult to read due to its mix of thin and thick strokes.
* Having poor language/extended character support.
* Not having other weights/styles (bold, italic, etc) and relying on browser approximations of those variants.

The next fonts down the stack (Garamond and Times) are more properly aligned to the appearance of the top-level serif font in the stack (Hoefler Text), and work better in its place.

Props kjellr, Rarst, justintadlock.
Fixes #45881.
Built from https://develop.svn.wordpress.org/trunk@45919


git-svn-id: http://core.svn.wordpress.org/trunk@45730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 18:58:57 +00:00
Sergey Biryukov ffcb1d0d99 Comments: In AJAX response when deleting a comment, account for `&nbsp;` as a thousands separator in `total_items_i18n` and `total_pages_i18n` numbers.
Props denisco, SergeyBiryukov.
Fixes #47953.
Built from https://develop.svn.wordpress.org/trunk@45918


git-svn-id: http://core.svn.wordpress.org/trunk@45729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 18:34:06 +00:00
Sergey Biryukov d26191eb03 Docs: Simplify `get_plugin_data()` and `get_file_data()` description.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45917


git-svn-id: http://core.svn.wordpress.org/trunk@45728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 16:57:56 +00:00
Sergey Biryukov 3f048f5ace Docs: Update plugin headers example in `get_plugin_data()` to clarify that `Version` is not a required field.
Props casiepa.
See #47110, #meta4707.
Built from https://develop.svn.wordpress.org/trunk@45916


git-svn-id: http://core.svn.wordpress.org/trunk@45727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 16:16:57 +00:00
John Blackbourn 640c90d35d Docs: Correct and improve inline docs relating to caching, terms, meta, and some misc tweaks.
See #47110   

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


git-svn-id: http://core.svn.wordpress.org/trunk@45726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 11:36:08 +00:00
Sergey Biryukov 16c43f368d Date/Time: Restore the previous behavior of `date_i18n()` where invalid input would result in current time.
Make `wp_date()` return `false` on invalid timestamp input, for consistency with upstream PHP `date()` function.

Props Rarst.
Fixes #28636.
Built from https://develop.svn.wordpress.org/trunk@45914


git-svn-id: http://core.svn.wordpress.org/trunk@45725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 23:18:55 +00:00
Sergey Biryukov 3965d4735c I18N: Add missing translator comment in help text on Reading Settings screen.
Props garrett-eclipse.
See #46708.
Built from https://develop.svn.wordpress.org/trunk@45913


git-svn-id: http://core.svn.wordpress.org/trunk@45724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 21:36:55 +00:00
Sergey Biryukov 7caac01470 Administration: Add a note to "For each post in a feed, include [Full text / Summary]" option that how content is displayed in browsers depends on the theme.
Add a documentation link to learn more about feeds.

Props JarretC, SergeyBiryukov, pento, talldanwp, dinhtungdu, noisysocks, tobifjellner.
Fixes #46708.
Built from https://develop.svn.wordpress.org/trunk@45912


git-svn-id: http://core.svn.wordpress.org/trunk@45723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 21:25:55 +00:00
Sergey Biryukov 4629fa26d2 Date/Time: Update XML-RPC tests for invalid date input to account for a more consistent `mysql2date()` error handling in [45908].
The tests were meant to check for the lack of a fatal error in case of invalid date input, not specifically mark a particular outcome as the correct one.

Props Rarst.
Fixes #28992.
Built from https://develop.svn.wordpress.org/trunk@45911


git-svn-id: http://core.svn.wordpress.org/trunk@45722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 16:44:55 +00:00
Felix Arntz 90c424f73b Multisite: Improve performance by caching not found lookups for sites and networks.
With this change, the result of a site or network lookup by ID will be cached even if the ID does not exist. When a new site or network is created, the cache for the respective new ID is cleared.

Props mnelson4, nielsdeblaauw.
Fixes #42251.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 12:42:56 +00:00
Mike Schroder ccdc221b32 Administration: Output valid HTML when `wp_die()` is called.
To better support HTML and string calls to `wp_die()` without
outputting invalid HTML, wraps error messages in `<div>` rather than `<p>`.

Adds `.wp-die-message` CSS class for styling.

Props dinhtungdu, jeremyfelt, audrasjb, SergeyBiryukov, afercia, audrasjb, noisysocks.
Fixes #47580.
Built from https://develop.svn.wordpress.org/trunk@45909


git-svn-id: http://core.svn.wordpress.org/trunk@45720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 07:54:01 +00:00
Sergey Biryukov 6057b32e9b Date/Time: Revamp `mysql2date()` to use `wp_date()` and handle invalid input in a consistent manner.
Add unit tests, improve documentation.

Props Rarst, pbearne.
Fixes #28992.
Built from https://develop.svn.wordpress.org/trunk@45908


git-svn-id: http://core.svn.wordpress.org/trunk@45719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 05:07:56 +00:00
Sergey Biryukov 29a6063f45 Coding Standards: Fix WPCS issue in [45906].
See #45322.
Built from https://develop.svn.wordpress.org/trunk@45907


git-svn-id: http://core.svn.wordpress.org/trunk@45718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 02:40:54 +00:00
Sergey Biryukov e0adbf69ff XML-RPC: Make sure editing a draft post with `wp.editPost` does not unintentionally cause its published date to be set.
Props redsweater.
Fixes #45322.
Built from https://develop.svn.wordpress.org/trunk@45906


git-svn-id: http://core.svn.wordpress.org/trunk@45717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 02:10:56 +00:00
Sergey Biryukov 27a384caa4 Site Health: Merge two similar strings explaining what drop-in plugins are.
Props garrett-eclipse, ramiy, Clorith.
Fixes #47247.
Built from https://develop.svn.wordpress.org/trunk@45905


git-svn-id: http://core.svn.wordpress.org/trunk@45716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 03:13:55 +00:00