Commit Graph

41830 Commits

Author SHA1 Message Date
desrosj
bc7de32645 Coding Standards: Correct two coding standards issues introduced in [48277] and [48334].
See #50504, #50550.
Built from https://develop.svn.wordpress.org/trunk@48345


git-svn-id: http://core.svn.wordpress.org/trunk@48114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:23:02 +00:00
desrosj
77af0e5982 Docs: Correct instances of “auto update” with “auto-update” for consistency.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48344


git-svn-id: http://core.svn.wordpress.org/trunk@48113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:15:03 +00:00
desrosj
ef0881750c Docs: Correct typo introduced in [48288].
See #42775.
Built from https://develop.svn.wordpress.org/trunk@48343


git-svn-id: http://core.svn.wordpress.org/trunk@48112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:10:02 +00:00
youknowriad
1fd50f7b2d Administration: Adapts the secondary buttons colors to the admin schemes.
The admin schemes that don't meet the contrast guidelines are excluded from this change.

Props mapk, michaelarestad, mcsf, ocean90.
Closes #50537.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:00:04 +00:00
Sergey Biryukov
ecd07ddada Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
See #50573.
Built from https://develop.svn.wordpress.org/trunk@48341


git-svn-id: http://core.svn.wordpress.org/trunk@48110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 18:22:02 +00:00
Andrea Fercia
454dab13c1 Accessibility: Administration: Improve the sortable postboxes areas on the Dashboard and Classic Editor pages.
- makes the postboxes areas in the Dashboard visible also on large screens 
- uses a more meaningful text when all postboxes areas are empty instead of "Drag boxes here"
- restores the ability to drag boxes to the "advanced" area in the Classic Editor page
- makes the postboxes areas in the Classic Editor page visible while dragging so that users have a clue what the available areas are
- improves the color contrast of the postboxes areas while dragging
- uses `wp.i18n` for translatable strings in `wp-admin/js/postbox.js`

Props xkon, karmatosed, audrasjb, ocean90, joedolson, afercia, azaozz.
See #20491.
Fixes #49288, #47541.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 18:03:02 +00:00
Sergey Biryukov
5ad2cf365e Coding Standards: Fix JSHint issue in js/_enqueues/lib/auth-check.js
See #49573.
Built from https://develop.svn.wordpress.org/trunk@48339


git-svn-id: http://core.svn.wordpress.org/trunk@48108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:27:02 +00:00
Sergey Biryukov
b99cce4e7a Tests: Add some assertions to PDF tests for better debugging.
Props enrico.sorcinelli.
See #50573.
Built from https://develop.svn.wordpress.org/trunk@48338


git-svn-id: http://core.svn.wordpress.org/trunk@48107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:16:02 +00:00
Andrew Ozz
b93b409976 Heartbeat: Do not disable the login prompts when the user needs to log in again but has closed the log in modal. Add a 5 minutes timeout before asking them to log in again.
Props dsixinetu, adamsilverstein, azaozz.
Fixes #49573.
Built from https://develop.svn.wordpress.org/trunk@48337


git-svn-id: http://core.svn.wordpress.org/trunk@48106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:14:04 +00:00
youknowriad
f867b02772 Block Editor: Requires title and content when registering block patterns.
Props poena.
See #50550.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 12:04:02 +00:00
youknowriad
4fa05e90e8 Block Editor: Remove the Testimonials block pattern.
This ensures we have the same patterns used in the Gutenberg plugin.

Props poena.
See #50550.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 11:19:04 +00:00
youknowriad
777872bdb1 Block Editor: Add the initial set of block patterns.
Included patterns:

text-two-columns
two-buttons
two-images
text-two-columns-with-images
text-three-columns-buttons
large-header
large-header-paragraph
three-buttons
quote
testimonials

Props mcsf, nrqsnchz.
See #50550.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 10:50:02 +00:00
Sergey Biryukov
c69101301b Tests: Correct hardcoded "3 months ago" assertion in tests/rest-api/rest-block-directory-controller.php.
Now that more than 3 months have passed since 2020-03-23, this was causing test failures.

Follow-up to [48242].

See #50321.
Built from https://develop.svn.wordpress.org/trunk@48333


git-svn-id: http://core.svn.wordpress.org/trunk@48102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:51:03 +00:00
youknowriad
82487d4b29 Administration: Fix link colors for admin schemes that personalize it using the $link SASS variable.
The new "moderne" admin scheme color personalizes the link color using the $link SASS variable.
The link color doesn't apply consistently in the admin to all links, especiall button links.

Fixes #50536.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:25:02 +00:00
Sergey Biryukov
234d0aff5c Coding Standards: Fix WPCS issues in tests/media.php.
See #50543.
Built from https://develop.svn.wordpress.org/trunk@48331


git-svn-id: http://core.svn.wordpress.org/trunk@48100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:19:05 +00:00
Sergey Biryukov
8a815f22e7 Privacy: Simplify the logic for updating the meta values for personal data export requests from absolute to relative paths.
Follow-up to [48127].

See #44038.
Built from https://develop.svn.wordpress.org/trunk@48330


git-svn-id: http://core.svn.wordpress.org/trunk@48099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 00:34:04 +00:00
Andrew Ozz
08dbc4c3bb Media:
- Introduce `wp_image_file_matches_image_meta()` utility function to check whether the image meta (retrieved by attachment ID) matches an image path or URI. A mismatch may happen in some cases, for example after the posts have been exported from one website and imported in another.
- Add unit tests for the new function.
- Improve `wp_image_src_get_dimensions()` a bit and use the new function to prevent these edge cases.

Fixes #50543.
Built from https://develop.svn.wordpress.org/trunk@48329


git-svn-id: http://core.svn.wordpress.org/trunk@48098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 23:32:03 +00:00
Sergey Biryukov
4e3bad1770 Query: Make sure the found_posts property of WP_Query is always an integer, to match the documented type.
This makes the property consistent with similar properties of other classes:
* `WP_Comment_Query::$found_comments`
* `WP_Network_Query::$found_networks`
* `WP_Site_Query::$found_sites`
* `WP_User_Query::$total_users`

Props birgire, PressLabs.
Fixes #42469.
Built from https://develop.svn.wordpress.org/trunk@48328


git-svn-id: http://core.svn.wordpress.org/trunk@48097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 21:34:02 +00:00
Sergey Biryukov
69e7e7681b Plugins: Consistently use an empty string as the default value for $replacement and $message parameters in:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`

This matches the documented type of `string` for these parameters and removes unnecessarily strict `! is_null()` checks.

Follow-up to [46792].

Props jignesh.nakrani, renathoc, SergeyBiryukov.
Fixes #49698.
Built from https://develop.svn.wordpress.org/trunk@48327


git-svn-id: http://core.svn.wordpress.org/trunk@48096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 21:09:03 +00:00
Sergey Biryukov
87f464c283 Plugins: Use include_once instead of include in uninstall_plugin(), in case the plugin file is already included.
Props valchovski, pcfreak30.
Fixes #47796.
Built from https://develop.svn.wordpress.org/trunk@48326


git-svn-id: http://core.svn.wordpress.org/trunk@48095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 20:32:03 +00:00
Sergey Biryukov
514ba95009 Docs: Fix typos in comments in tests/dependencies/jquery.php.
Props hareesh-pillai.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48325


git-svn-id: http://core.svn.wordpress.org/trunk@48094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 20:29:00 +00:00
Andrew Ozz
e0d2307ec5 Build/Test Tools: update PHPUnit tests after [48323]. Disable and keep the specific jQuery Migrate dependency tests for use in WP 5.6.
See #37110.
Built from https://develop.svn.wordpress.org/trunk@48324


git-svn-id: http://core.svn.wordpress.org/trunk@48093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 19:24:08 +00:00
Andrew Ozz
bc54b15893 External Libraries: First step of updating jQuery. Disable jQuery Migrate 1.4.1, keep jQuery at 1.12.4-wp, and UI at 1.11.4. Also keep the jquery-core script handle for full backwards compatibility.
Props jorbin, adamsilverstein, westonruter, retlehs, pento, onokazu, galbaras, netweb, zakkath, dmethvin, LittleBigThing, markgoho, iandunn, remzicavdar, bigcloudmedia, jacklinkers, levdbas, a4jpcom, azaozz.

See #37110.
Built from https://develop.svn.wordpress.org/trunk@48323


git-svn-id: http://core.svn.wordpress.org/trunk@48092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 18:28:04 +00:00
Sergey Biryukov
f14f0c1ddf XML-RPC: Explicitly unset the reference to the parser resource after calling xml_parser_free() to avoid memory leaks in PHP 7.0.0 or higher.
Props procifer, ayeshrajans.
Fixes #49700.
Built from https://develop.svn.wordpress.org/trunk@48322


git-svn-id: http://core.svn.wordpress.org/trunk@48091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 15:22:01 +00:00
Sergey Biryukov
b0703f3749 Options, Meta APIs: Introduce register_setting and unregister_setting actions.
Props Howdy_McGee, Pionect.
Fixes #37245.
Built from https://develop.svn.wordpress.org/trunk@48321


git-svn-id: http://core.svn.wordpress.org/trunk@48090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 15:07:06 +00:00
Sergey Biryukov
93abb3b3d0 Docs: Improve documentation for various option functions.
Props andfinally, david.binda, SergeyBiryukov.
Fixes #49566.
Built from https://develop.svn.wordpress.org/trunk@48320


git-svn-id: http://core.svn.wordpress.org/trunk@48089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 14:46:03 +00:00
Dominik Schilling
310db57c48 Administration: Add delete_count to wp_removable_query_args().
It's a single-use URL parameter that does not need to be passed to canonical URLs in the admin.

Props opurockey.
Fixes #50464.
Built from https://develop.svn.wordpress.org/trunk@48319


git-svn-id: http://core.svn.wordpress.org/trunk@48088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 13:57:03 +00:00
Dominik Schilling
56afcf2d68 Posts: Provide a HiDPI version for the avatar used in post locked dialogs.
Props wpdesk, audrasjb, ocean90.
Fixes #39633.
Built from https://develop.svn.wordpress.org/trunk@48318


git-svn-id: http://core.svn.wordpress.org/trunk@48087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 13:00:07 +00:00
Sergey Biryukov
618eeabba8 Tests: Remove ja_JP locale from Tests_DB::test_locale_floats().
This test is only relevant for locales using a comma as a decimal separator, while `ja_JP` uses a dot.

Props gh640, johnjamesjacoby, SergeyBiryukov.
Fixes #49690.
Built from https://develop.svn.wordpress.org/trunk@48317


git-svn-id: http://core.svn.wordpress.org/trunk@48086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 12:52:04 +00:00
Sergey Biryukov
201c7fbf97 Administration: Bring the update nag in line with other admin notices.
In addition to more consistent display, this gives it a visible border on the About page.

Props desrosj, nikhilbhansi, afercia, SergeyBiryukov.
Fixes #50372.
Built from https://develop.svn.wordpress.org/trunk@48316


git-svn-id: http://core.svn.wordpress.org/trunk@48085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:57:04 +00:00
Dominik Schilling
6496c61741 Multisite: Delete the signup entry when a user is deleted from the database.
When a user has registered with incorrect data and got the account deleted immediately, it currently wasn't possible to register with the same login or email address again due to the existing signup entry. They had to wait for two days until the entry gets automatically deleted. Now the associated signup entry gets deleted as part of the account deletion.

Fixes #43232.
Built from https://develop.svn.wordpress.org/trunk@48315


git-svn-id: http://core.svn.wordpress.org/trunk@48084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:21:03 +00:00
Sergey Biryukov
de751a91db Taxonomy: Introduce saved_term and saved_{$taxonomy} actions to complement created_term and created_{$taxonomy}.
This allows for hooking into both the create and update events with a single callback, in the same way that is already possible for posts via the `save_post` and `save_post_{$post->post_type}` actions.

Props dlh.
Fixes #48416.
Built from https://develop.svn.wordpress.org/trunk@48314


git-svn-id: http://core.svn.wordpress.org/trunk@48083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:13:03 +00:00
Dominik Schilling
5b7774722e Users: Pass the WP_User object to the wpmu_delete_user, delete_user, and deleted_user actions.
See #43232.
Built from https://develop.svn.wordpress.org/trunk@48313


git-svn-id: http://core.svn.wordpress.org/trunk@48082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:57:01 +00:00
Sergey Biryukov
e0be0aef8b Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments.
Props dingo_d.
See #50546.
Built from https://develop.svn.wordpress.org/trunk@48312


git-svn-id: http://core.svn.wordpress.org/trunk@48081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:41:10 +00:00
Dominik Schilling
40a660461e Administration: Make all color schemes available when running from /src.
To run WordPress from /src you have to use the `--dev` flag which also builds the color scheme stylesheets thus the restriction is no longer required.

See #44492.
Fixes #50558.
Built from https://develop.svn.wordpress.org/trunk@48311


git-svn-id: http://core.svn.wordpress.org/trunk@48080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:40:02 +00:00
Sergey Biryukov
9f92384fe7 Post Thumbnails: Change the return value of get_post_thumbnail_id() for a non-existing post to false instead of an empty string.
This further makes the function more consistent with `get_the_ID()` or `wp_get_post_parent_id()`, both returning `false` for a non-existing post.

Additionally, document that `get_post_thumbnail_id()` returns `0` if the thumbnail image is not set.

Follow-up to [47160].

Props theMikeD, dingo_d, netpassprodsr, SergeyBiryukov.
Fixes #49832. See #40096.
Built from https://develop.svn.wordpress.org/trunk@48310


git-svn-id: http://core.svn.wordpress.org/trunk@48079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:17:02 +00:00
Andrea Fercia
e661df6b9e Docs: Replace @returns tag in media/views/attachment/details.js with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.

Follow-up to [46800], [48232].
See #49572.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 08:03:01 +00:00
TimothyBlynJacobs
0386c0ae6c REST API: Remove specific multi-type schema handling from the themes controller.
Multi-type schema handling was improved in [48306]. In particular, it now allows for sanitizing a multi-typed value that wouldn't validate. Removing this handling will make 3rd party registered theme features more robust.

Fixes #50562.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 01:06:02 +00:00
TimothyBlynJacobs
e6f620570d REST API: Correct the return type of rest_sanitize_value_from_schema.
Fixes #45486.
Props birgire, Jean-David, mukesh27, priyankkpatel.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 00:19:02 +00:00
TimothyBlynJacobs
77b474c905 REST API: Make multi-typed schemas more robust.
A multi-type schema is a schema where the `type` keyword is an array of possible types instead of a single type. For instance, `[ 'object', 'string' ]` would allow objects or string values.

In [46249] basic support for these schemas was introduced. The validator would loop over each schema type trying to find a version that matched. This worked for valid values, but for invalid values it provided unhelpful error messages. The sanitizer also had its utility restricted.

In this commit, the validators and sanitizers will first determine the best type of the passed value and then apply the schema with that set type. In the case that a value could match multiple types, the schema of the first matching type will be used.

To maintain backward compatibility, if unsupported schema types are used, the value will always pass validation. A doing it wrong notice is issued in this case.

Fixes #50300.
Props pentatonicfunk, dlh, TimothyBlynJacobs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 00:15:05 +00:00
Sergey Biryukov
0ba0b61ed8 Login and Registration: Set a more appropriate page title for the "check your email" step of new user registration or password reset.
Follow-up to [48304].

See #40605, #41514.
Built from https://develop.svn.wordpress.org/trunk@48305


git-svn-id: http://core.svn.wordpress.org/trunk@48074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 22:03:02 +00:00
Sergey Biryukov
722df60bcd Login and Registration: Hide the login form on the "check your email" step of new user registration or password reset.
This aims to reduce some confusion and make it clearer that the email should be checked before attempting to log in right away.

Props rianrietveld, pratik028, bdbch, johnbillion, hankthetank, yashrs, williampatton, audrasjb, bmartinent, florianatwhodunit, henry.wright, birgire, SergeyBiryukov.
Fixes #40605, #41514.
Built from https://develop.svn.wordpress.org/trunk@48304


git-svn-id: http://core.svn.wordpress.org/trunk@48073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 21:58:03 +00:00
Sergey Biryukov
324cd48507 Login and Registration: Remove newpass value handling in wp-login.php.
This value is never set as of [15710].

See #40605.
Built from https://develop.svn.wordpress.org/trunk@48303


git-svn-id: http://core.svn.wordpress.org/trunk@48072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 21:15:02 +00:00
Sergey Biryukov
6adad022e2 Docs: Correct spelling of "backward compatibility" per the Core Contributor Handbook glossary.
Follow-up to [45232].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48302


git-svn-id: http://core.svn.wordpress.org/trunk@48071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 20:42:06 +00:00
Sergey Biryukov
db0e0ca245 Coding Standards: Wrap some long lines in wp-admin/js/site-health.js per the JS coding standards for better readability.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48301


git-svn-id: http://core.svn.wordpress.org/trunk@48070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:56:07 +00:00
TimothyBlynJacobs
5ffac7cab7 REST API: Only validate the format keyword if the type is a string.
This allows for using multi-type support with a string that has a format. For backwards compatibility support, the format validation will still apply if the type is not specified, or it is invalid.

Two new doing it wrong notices are issued when omitting a type, or using an invalid type.

Props ryotsun.
Fixes #50189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:53:03 +00:00
Sergey Biryukov
e3e45b6428 Customize: Correct the check for rendered widgets in WP_Customize_Widgets::is_widget_rendered().
Make the structure of `::$rendered_sidebars` and `::$rendered_widgets` properties consistent.

This resolves an issue with every widget being marked as inactive by default on the Widgets panel.

Props dlh, afercia, SergeyBiryukov.
Fixes #50508.
Built from https://develop.svn.wordpress.org/trunk@48299


git-svn-id: http://core.svn.wordpress.org/trunk@48068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:35:01 +00:00
Sergey Biryukov
d90213bf18 Docs: Replace @returns tag in wp-admin/js/post.js with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.

Follow-up to [46800], [48232].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48298


git-svn-id: http://core.svn.wordpress.org/trunk@48067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:10:10 +00:00
Sergey Biryukov
c65f40956e Coding Standards: Rename functions in wp-admin/js/site-health.js per the JS coding standards.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48297


git-svn-id: http://core.svn.wordpress.org/trunk@48066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:09:07 +00:00
Sergey Biryukov
5fb7c090de Media: Add heic extension to wp_get_ext_types(), for consistency with wp_get_mime_types().
Follow-up to [48288].

Props imath.
Fixes #50557. See #42775.
Built from https://develop.svn.wordpress.org/trunk@48296


git-svn-id: http://core.svn.wordpress.org/trunk@48065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 17:09:01 +00:00