The heading image had quality issues on iOS Safari in portrait and landscape modes. This resolves it through adding 200cv for smaller screens so less than full size.
Props poena, richardevs, laurelfulford, davidakennedy, joemcgill, SergeyBiryukov, ianbelanger, sabernhardt, shailu25, robertghetau.
Fixes#39253.
Built from https://develop.svn.wordpress.org/trunk@58135
git-svn-id: http://core.svn.wordpress.org/trunk@57600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds descriptions to multiple bundled themes. All patterns without the "Inserter" parameter set to "false" or "no", should use the description parameter (These patterns are hidden in the block inserter and do not use the descriptions).
Props poena, StringPiggy, oglekler, audrasjb, huzaifaalmesbah, swisspidy.
Fixes#59688.
Built from https://develop.svn.wordpress.org/trunk@58111
git-svn-id: http://core.svn.wordpress.org/trunk@57576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The FAQ pattern uses multiple details blocks in a row. This ends up with it behaving as an accordion and opens to issues. In ticket discussion this was decided to be removed to set a good example of how to build.
Props poena, alh0319, abditsori, richtabor, joedolson, huzaifaalmesbah, krupajnanda, luminuu, shailu25, swisspidy.
Fixes#60335.
Built from https://develop.svn.wordpress.org/trunk@58106
git-svn-id: http://core.svn.wordpress.org/trunk@57571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The pullquote block needed the base font size adding back in. This also adds in support for appearance settings for weight and style in addition to the original ticket. This fixes a previous commit which changed the default font size of pullquote blocks, quote blocks and blockquotes.
Props sabernhardt.
Fixes#61034.
Built from https://develop.svn.wordpress.org/trunk@58053
git-svn-id: http://core.svn.wordpress.org/trunk@57518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes the issue where negative values aren't allows in older versions of IE. There is more discussion in another ticket on a wider approach, but for now the decision to commit this was made as an interim solution.
Props mukesh27, SergeyBiryukov, sabernhardt, poena.
Fixes#46771.
Built from https://develop.svn.wordpress.org/trunk@58005
git-svn-id: http://core.svn.wordpress.org/trunk@57479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The pullquote block wasn't reflecting text color added for quote and add citation text across the front and back of editor. This fixes that by adding ensuring whatever color is selected is shown in both
Props kajalgohel.
Fixes#56524.
Built from https://develop.svn.wordpress.org/trunk@57896
git-svn-id: http://core.svn.wordpress.org/trunk@57397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There wasn't enough padding and the spacing was deteriorating the more depth there was. This reflects the front now and respects background coloring. Impacts both types of lists although original reporting was just on one.
Props aezazshekh, krupalpanchal, multidots1896, kajalgohel, sabernhardt.
Fixes#56083.
Built from https://develop.svn.wordpress.org/trunk@57895
git-svn-id: http://core.svn.wordpress.org/trunk@57396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improvements made to the focus outline style for Twenty Twenty-Four caused a regression in the focus outlines of the block editor. This commit solves the regressions by reducing the CSS specificity while keeping the improvements.
Follow-up to [57554].
Props wildworks, poena, sabernhardt, youknowriad, oglekler.
Fixes#60535.
Built from https://develop.svn.wordpress.org/trunk@57739
git-svn-id: http://core.svn.wordpress.org/trunk@57240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update XX-large font-sizes so that the responsive typography meets the minimum ratio between the min and max font-sizes of 0.61 required for accessible responsive typography.
Props mikachan, ryokuhi, poena, dhruvishah2203, joedolson.
Fixes#58603.
Built from https://develop.svn.wordpress.org/trunk@57690
git-svn-id: http://core.svn.wordpress.org/trunk@57191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `.editor-block-list__block` class was removed in WordPress 5.4. It is now replaced with a selector that works in the current versions and is backward compatible.
Follow-up to [43842].
Props poena, faisal03, ashikur698.
Fixes#59922.
Built from https://develop.svn.wordpress.org/trunk@57637
git-svn-id: http://core.svn.wordpress.org/trunk@57138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Pullquotes were not inheriting the correct styling from the block
editor. This commit resolves the issue by supporting typography options.
1. The `font-family` variable remains on the paragraph (both editor and front) so the citation continues to use the body font even when the site redefines `var(--pullquote--font-family)`.
2. The `font-size`, `font-style`, `font-weight`, `letter-spacing` and `line-height` are set on the Pullquote block to allow overriding with the sidebar settings. Then the block's paragraph element inherits those styles.
3. When the settings do not give a custom `line-height` from the sidebar, these stylesheets set the paragraph to `var(--pullquote--line-height)` instead of inheriting 1.6 from the block styles. This patch uses `:where()` to avoid increasing specificity.
Moving styles from the paragraph element to the block should not affect the citation, which has had its own styles for `font-size`, `font-style`, `font-weight` and `letter-spacing`.
Follow-up to [56959], [56451], [55089], [55088], [49574], [49320], [49216].
Props sabernhardt, poena, darshitrajyaguru97, harshgajipara, shailu25, skyakash12.
Fixes#57854.
Built from https://develop.svn.wordpress.org/trunk@57631
git-svn-id: http://core.svn.wordpress.org/trunk@57132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset ensures the result of the font URL functions is a `string` before using it in `add_editor_style()`, to avoid PHP warnings on child themes. This similarily updates Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, and Twenty Seventeen.
Props jordesign, SergeyBiryukov, sabernhardt, huzaifaalmesbah, shailu25.
Fixes#59704.
Built from https://develop.svn.wordpress.org/trunk@57601
git-svn-id: http://core.svn.wordpress.org/trunk@57102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit moves `line-height` to the Buttons container and removes the duplicate `outline` property.
Props sabernhardt, nidhidhandhukiya, monzuralam, shailu25, hrrarya, karmatosed, harshgajipara, nicolefurlan, fnpen, oglekler, poena, huzaifaalmesbah, audrasjb.
Fixes#58443.
Built from https://develop.svn.wordpress.org/trunk@57599
git-svn-id: http://core.svn.wordpress.org/trunk@57100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue where the `.privacy-policy` styles were applied to other locations than the footer only, like the `privacy-policy` page itself.
Props mnydigital, sabernhardt, huzaifaalmesbah, shailu25, poena.
Fixes#60469.
Built from https://develop.svn.wordpress.org/trunk@57589
git-svn-id: http://core.svn.wordpress.org/trunk@57090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the front end, this changeset restores the theme's default border color when (and only when) the block's text color is the default.
In the editor, these styles repurpose the user-selected color for the border, to match the front.
Props nidhidhandhukiya, sabernhardt, pooja1210, pouicpouic, poena, shailu25, ugyensupport, wasiur195, rajinsharwar, wasiur195, jivygraphics, huzaifaalmesbah, harshgajipara, nicolefurlan, sumitbagthariya16.
Fixes#58022.
Built from https://develop.svn.wordpress.org/trunk@57587
git-svn-id: http://core.svn.wordpress.org/trunk@57088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that there is some spacing between the Cover and File blocks.
Props mukesh27, mayur8991, panchalhimani711, sabernhardt, itpathsolutions, thakordarshil, ankit-k-gupta, ugyensupport, pooja1210, shailu25, harshgajipara, darshitrajyaguru97, poena.
Fixes#58498.
Built from https://develop.svn.wordpress.org/trunk@57581
git-svn-id: http://core.svn.wordpress.org/trunk@57082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that avatars design in the Post Author or Avatar blocks in the editor matches the front end.
Props pitamdey, shailu25, poena, sabernhardt, balub, sarath.ar, nicolefurlan, harshgajipara, pooja1210.
Fixes#59285.
Built from https://develop.svn.wordpress.org/trunk@57579
git-svn-id: http://core.svn.wordpress.org/trunk@57080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If a plugin also registers the category name `pages` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.
With a prefix, extenders can still override it, but it would be intentional.
Props poena, swissspidy, shailu25.
Fixes#59839.
Built from https://develop.svn.wordpress.org/trunk@57569
git-svn-id: http://core.svn.wordpress.org/trunk@57070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If a plugin also registers the category name `page` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.
With a prefix, extenders can still override it, but it would be intentional.
Props shailu25, poena, acosmin, harshgajipara, swissspidy.
See #59839.
Built from https://develop.svn.wordpress.org/trunk@57555
git-svn-id: http://core.svn.wordpress.org/trunk@57056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Set a global focus outline for block elements in Twenty Twenty-Four to enhance accessibility. Replace the 1px dotted outline previously assigned on the button block.
Props alh0319, poena, beafialho, shailu25.
Fixes#60334.
Built from https://develop.svn.wordpress.org/trunk@57554
git-svn-id: http://core.svn.wordpress.org/trunk@57055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Additionally, this changeset fixes some of the `block.json` and `theme.json` files in PHPUnit tests by adding missing `title` properties to satisfy the schema. Those changes have no impact on the runtime whatsoever and do not change the result of unit tests.
Note that some block and theme JSON files still aren't valid according to the schema. Fixing is underway; the required changes will be merged subsequently.
Props jonsurrell, dmsnell, gziolo.
Fixes#60255.
Built from https://develop.svn.wordpress.org/trunk@57336
git-svn-id: http://core.svn.wordpress.org/trunk@56842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds missing text domain to block patterns in Twenty Sixteen, Twenty Seventeen and Twenty Twenty-Four.
Follow-up to [49583] (Twenty Sixteen), [49584] (Twenty Seventeen) and [56716] (Twenty Twenty-Four.)
Props shailu25, sabernhardt.
Fixes#60245.
Built from https://develop.svn.wordpress.org/trunk@57281
git-svn-id: http://core.svn.wordpress.org/trunk@56787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”
While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive.
Words matter.
Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927].
Props dartiss, hellofromTonya.
Fixes#60187.
Built from https://develop.svn.wordpress.org/trunk@57239
git-svn-id: http://core.svn.wordpress.org/trunk@56745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update copyright year to 2024 in `license.txt` and bundled themes.
Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427], [55024].
Built from https://develop.svn.wordpress.org/trunk@57235
git-svn-id: http://core.svn.wordpress.org/trunk@56741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds the `engines` field to the `package.json` file for the three default themes with build processes in order to encourage consistent tooling for contributors.
Some minor dependency updates for these themes are also included in this change.
Props jorbin, joemcgill, swissspidy.
See #59663.
Built from https://develop.svn.wordpress.org/trunk@57213
git-svn-id: http://core.svn.wordpress.org/trunk@56719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In preparation for updating Core to use Node.js version 18.x, this updates the dependancies for the Twenty Twenty-One theme to the latest versions. This addresses an unsupported engine warning where packages within the dependency tree did not support Node.js > 16.x.
All changes to built files are included in this commit. These changes are a result of the following:
- Identical sets of properties for multiple selectors are now consolidated into one.
- The removal of a duplicate `--branding--description--font-family` definition.
- The addition of the `postcss-discard-empty` dependency, which removes empty CSS rules within IE stylesheets after the previous consolidation is performed.
- `stylelint` has only been updated to 14.x (15.x is the latest). This is because `@wordpres/stylelint-config` currently has a version constraint of `^14.2` and does not properly support 15.x.
The last change of note is the new configuration for the `value-keyword-case` rule in `.stylelint-css.json`. This was added as a way to prevent the `currentColor` from being changed to all lowercase.
Props jorbin, poena.
See #59663, #59658.
Built from https://develop.svn.wordpress.org/trunk@57122
git-svn-id: http://core.svn.wordpress.org/trunk@56633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This update includes the following bugfixes:
- Fix: Added a new block pattern for the home template that inherits the page query and fits the design of the home page. (more context on the theme repo: https://github.com/WordPress/twentytwentyfour/pull/706)
- Fix: Rely on parent theme data for block style.
- Fix: Categories for some patterns.
- Fix: Minor labeling issues
Follow-up to [56999], [56951], [56813], [56764], [56716].
Props anlino, beafialho, desrosj, devmuhib, didierjm, fabiorubioglio, flixos90, hanneslsm, hellofromTonya, huzaifaalmesbah, ktaron, luminuu, mshowes, onemaggie, phillsav, poena, rajinsharwar, richtabor, shailu25.
Fixes#59770, #59759.
Built from https://develop.svn.wordpress.org/trunk@57036
git-svn-id: http://core.svn.wordpress.org/trunk@56547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This update includes updates to patterns to correct color issues and some code quality fixes.
Follow-up to [56951], [56813], [56764], [56716].
Props luminuu, richtabor, onemaggie, kafleg, swissspidy, huzaifaalmesbah, neilorangepeel, shailu25, lada7042, mukesh27, nilovelez, jorbin.
Fixes#59711.
Built from https://develop.svn.wordpress.org/trunk@56999
git-svn-id: http://core.svn.wordpress.org/trunk@56510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Reverts [56451] to avoid the following issues:
* missing the default `font-size` for anyone who does not use the size control.
* unintentional reduction in citation's `line-height` down to the `--pullquote--line-height` value (1.3 instead of 1.6).
With 6.4 RC1 happening shortly, this revert is necessary to avoid shipping this issues in the release, while giving the time needed to resolve in the next cycle.
Follow-up to [56451].
Props sabernhardt, nicolefurlan.
See #57854.
Built from https://develop.svn.wordpress.org/trunk@56959
git-svn-id: http://core.svn.wordpress.org/trunk@56470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The required version was previously set to two different values:
* 4.7 in the theme's `functions.php` file.
* 4.9.6 in theme headers, because of the `the_privacy_policy_link()` function usage in `footer.php`.
However, as `the_privacy_policy_link()` call is wrapped in a `function_exists()` check, it does not affect the requirements in practice.
This commit aims to correct the discrepancy by updating theme headers to match the actual required WP version.
Follow-up to [43808], [43892].
Props poena, kafleg, felipeelia, audrasjb, huzaifaalmesbah, shailu25, nicolefurlan, oglekler.
Fixes#59557.
Built from https://develop.svn.wordpress.org/trunk@56952
git-svn-id: http://core.svn.wordpress.org/trunk@56463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Resyncing changes for TT4 into Core.
Changes include:
* Reformatted all the patterns for readability.
* Bugfixes in the markup and improvements on the string translation functions.
* Renaming of some patterns, making them consistent with the content they show and whether they are simple patterns, full-page patterns or patterns meant to replace templates.
Follow-up to [56813], [56764], [56716].
Props richtabor, onemaggie, luminuu, shailu25, dunhakdis, shivashankerbhatta, dajeema, enodekciw, kafleg, viralsampat, glendaviesnz, beafialho, webmandesign, huzaifaalmesbah, gregfuller, benharri.
Fixes#59640.
Built from https://develop.svn.wordpress.org/trunk@56951
git-svn-id: http://core.svn.wordpress.org/trunk@56462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Within the details block, style the `summary` element using the default display, `list-item`, this ensures the toggle icon appears indicating the summary can be expanded or contracted.
Props ankit-k-gupta, nicolefurlan, poena, sabernhardt.
Fixes#58915.
Built from https://develop.svn.wordpress.org/trunk@56940
git-svn-id: http://core.svn.wordpress.org/trunk@56451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Instead of displaying the color names, two of the default colors displayed the color code, which was only intended to show when the user has enabled the custom color option in the Customizer.
The reason is that the default value for the option is `false`, and this value is changed to the string `'custom'` if the color option is enabled, and the string `'default'` if the custom color is enabled and then reset to default colors.
This commit adjusts the logic for displaying the color name, to make sure that the string value `'default'` is not compared with `false`, by adding the default value as a parameter to `get_theme_mod( 'primary_color' )`.
Follow-up to [45964].
Props poena, mukesh27, ugyensupport, shailu25, anveshika, harshgajipara, nicolefurlan, syamraj24, balub, vivekawsm.
Fixes#59566.
Built from https://develop.svn.wordpress.org/trunk@56935
git-svn-id: http://core.svn.wordpress.org/trunk@56446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
At screen widths of at least 768px (tablet size), Twenty Nineteen should have a `max-width` and side margins for content in the post editor.
This commit applies that style to the new `.block-editor-iframe__body` class, resolving an issue where full-width blocks had a horizontal scrollbar in the editor iframe.
Props sabernhardt, smit08, nidhidhandhukiya, mukesh27, darshitrajyaguru97, oglekler, poena, shailu25, nicolefurlan.
Fixes#59449.
Built from https://develop.svn.wordpress.org/trunk@56832
git-svn-id: http://core.svn.wordpress.org/trunk@56344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset:
- Replaces `body` with `html` for the first CSS selector that makes text white against a dark background
- Moves `twentytwenty_block_editor_styles()` from the `enqueue_block_editor_assets` action to `enqueue_block_assets` for WordPress 6.3 and later
- Removes the obsolete `twentytwenty-block-editor-script` from the styles function to avoid an error in the iframe
Props floydwilde, poena, huzaifaalmesbah, greenshady, sabernhardt, audrasjb, pooja1210, shailu25, joemcgill.
Fixes#59086.
Built from https://develop.svn.wordpress.org/trunk@56783
git-svn-id: http://core.svn.wordpress.org/trunk@56295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Twenty-Four (TT4) updates for 6.4 Beta 2.
Changes include bugfixes from the theme's development repo since Beta 1 such as:
* Renamed patterns and images
* Improved image descriptions
* Polished a few of the templates to fit better the design
* Addressed some a11y concerns.
* Changed the required version to 6.4, aligning it with the last few default themes since we are making use of some of the features that will make it to 6.4, such as aspect ratio.
Follow-up to [56726], [56721], [56716].
Props onemaggie, desrosj, mukesh27.
Fixes#59524.
Built from https://develop.svn.wordpress.org/trunk@56764
git-svn-id: http://core.svn.wordpress.org/trunk@56276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography.
Twenty Twenty-Four comes with style variations and full page designs to help speed up the site building process, is fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4.
Twenty-Four karat magic in the air!
Props onemaggie, luminuu, beafialho, chrisdesrochers, amedv, melchoyce, kafleg, jeffikus, poena, robpetrin, hiyascout, audrasjb, huzaifaalmesbah, fabiankaegy, jordesign, vcanales, shailu25, jessplease, juanfra, maneshtimilsina, sabernhardt, richtabor, travel_girl, kishanjasani, sofiashendi, nudge, gnanasekaran, marcelle42, bosskhj, oncecoupled, bijayyadav, barbmiller, devmuhib, lyndauwp, kraftbj, alaminfirdows, littlebigthing, dhamibirendra, jeffpaul, kopila47, rabmalin, aplauche, colorful-tones, khleomix, pbking, esratpopy, scruffian, alexandrebuffet, gpotter, pbwebd, anphira, suprsam, damonsharp, maurodf, soean, kawsaralameven, mhimon, rajinsharwar, labunchemjong, bonkerz, karmacharya50, aristath, mukesh27, mikachan, joedolson, aurooba, afercia, jffng, benimub, joen, tanvirul, jeryj, thelovekesh, mrwweb, nielslange, sergiomdgomes, binsaifullah, hanneslsm, masoudnkh, dhrumilk, dianeco, webmandesign, desrosj.
See #59447.
Built from https://develop.svn.wordpress.org/trunk@56716
git-svn-id: http://core.svn.wordpress.org/trunk@56228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The dimension attributes `width` and `height` should be present on every image in order to avoid layout shifts and be able to leverage WordPress core's image loading optimization functionality.
This changeset adds dimension attributes to the `core/image` blocks used in block patterns in Twenty Twenty-Two, where this is particularly critical as WordPress core cannot backfill the attributes for those images, as their sources are not part of the Media Library.
Props spacedmonkey, thekt12, mukesh27, flixos90.
Fixes#59256.
Built from https://develop.svn.wordpress.org/trunk@56613
git-svn-id: http://core.svn.wordpress.org/trunk@56125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `the_header_image_tag` function was introduced in WordPress 4.4 as part of [35594]. It is used in all themes created post WordPress 4.4 that supported header images. The function `get_header_image_tag` continues to get updated with new image features, like lazy loading, async decoding and fetch priority. To ensure our core themes maintain compatibility and benefit from these enhancements, a backward compatibility shim has been applied, integrating the `the_header_image_tag` function into the following core themes:
- Twenty Ten
- Twenty Eleven
- Twenty Twelve
- Twenty Fourteen
- Twenty Sixteen
This change ensures future compatibility and modern image features are applied for header images to these older themes.
Props spacedmonkey, flixos90, mukesh27.
Fixes#58675.
Built from https://develop.svn.wordpress.org/trunk@56583
git-svn-id: http://core.svn.wordpress.org/trunk@56095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Add `defer` loading strategy for all frontend end-user theme scripts (excluding Customizer preview).
* Move scripts to the `head` which relate to the initial page viewport to ensure they start loading earlier and execute sooner while still not blocking rendering.
* Update Twenty Twenty's script loader (`TwentyTwenty_Script_Loader`) to support core's built-in script loading strategies (#12009), while also retaining backwards-compatibility for child themes that may set `async` and `defer` script data.
* Update the main script loading strategy in Twenty Twenty from `async` to `defer` for better performance on repeat page views, since when an `async` script is cached it will block rendering.
Props westonruter, flixos90, sabernhardt.
Fixes#59316.
Built from https://develop.svn.wordpress.org/trunk@56556
git-svn-id: http://core.svn.wordpress.org/trunk@56068 1a063a9b-81f0-0310-95a4-ce76da25c4cd