Commit Graph

31546 Commits

Author SHA1 Message Date
jorgefilipecosta 6db7930147 Ports theme.json changes for beta 3.
- Add _wp_to_kebab_case function
- Add CSS Custom Properties within preset classes.

Props nosolosw.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51198


git-svn-id: http://core.svn.wordpress.org/trunk@50807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 09:51:00 +00:00
Peter Wilson 0d8727bec8 Themes: Improve Gutenberg check before activating an FSE theme.
Account for sites enabling Gutenberg as an mu-plugin when determining whether full-site-editing themes can be enabled. This replaces the check the plugin is active with a check whether the function `gutenberg_is_fse_theme()` is defined.

Follow up to [51193].

Props noisysocks, peterwilsoncc, SergeyBiryukov.
See #53410.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 05:56:57 +00:00
Sergey Biryukov e84cfe850d Tests: Use more appropriate assertions in a few tests.
Follow-up to [34804], [41376], [50959], [51124].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51196


git-svn-id: http://core.svn.wordpress.org/trunk@50805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:35:59 +00:00
antpb b2c449b1ec Media: Improve upload page media item layout on smaller screens.
This allows smaller screens to wrap error messages and other uploader media item elements in a more readable way.

Props joedolson sabernhardt, Presskopp.
See #51754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:26:58 +00:00
desrosj 84ee1c9de5 Themes: Remove unexpected border around the Theme Details button.
After [51083], the Theme Details button is now displaying a border unintentionally. This removes it.

Props ryelle.
Fixes #53473.
Built from https://develop.svn.wordpress.org/trunk@51194


git-svn-id: http://core.svn.wordpress.org/trunk@50803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:03:57 +00:00
desrosj 94841ace05 Themes: Prevent a Full Site Editing theme from being activated when Gutenberg is not active.
When a theme that uses the Full Site Editing feature is activated and the Gutenberg plugin is not present, the site will currently show a text notice on the front end. The user is not made aware of this unless they visit the front end of their site.

This adds a check that will prevent a theme from being activated when the `full-site-editing` tag is present in the theme’s `style.css` header and the Gutenberg plugin is not active to prevent this scenario.

These checks can be removed once Full Site Editing is completely merged into Core.

Props desrosj, marybaum, chanthaboune.
See #53410.
Built from https://develop.svn.wordpress.org/trunk@51193


git-svn-id: http://core.svn.wordpress.org/trunk@50802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 02:59:56 +00:00
desrosj 52e1e2cc2f Twenty Thirteen: Improve the display of the Query Loop block.
This fixes an issue where Query Loop blocks were displayed with list bullets and extra `padding-left`.

Props AlePerez92, scruffian, ryelle.
Fixes #53438.
Built from https://develop.svn.wordpress.org/trunk@51192


git-svn-id: http://core.svn.wordpress.org/trunk@50801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 23:39:56 +00:00
joedolson d5c9c310e7 Media: Update total attachment count when media added or removed.
Add handlers to increment the total attachments count for the media collection when an item is added or removed.

props adamsilverstein.
Fixes #53171.
Built from https://develop.svn.wordpress.org/trunk@51191


git-svn-id: http://core.svn.wordpress.org/trunk@50800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 20:46:02 +00:00
Sergey Biryukov dc51282844 Users: Escape `get_author_posts_url()` link in `wp_list_authors()`.
This is consistent with `get_the_author_posts_link()`.

Props chintan1896.
Fixes #50698.
Built from https://develop.svn.wordpress.org/trunk@51190


git-svn-id: http://core.svn.wordpress.org/trunk@50799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 06:06:57 +00:00
Sergey Biryukov 19f8ac491d Administration: Consistently escape `network_admin_url()` links.
Follow-up to [51177].

Props chintan1896, mukesh27.
Fixes #53459.
Built from https://develop.svn.wordpress.org/trunk@51189


git-svn-id: http://core.svn.wordpress.org/trunk@50798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 04:30:56 +00:00
Sergey Biryukov ca5f990078 Docs: Correct `@since` version in the `wp-includes/version.php` file header.
There was no public release of WordPress 1.1.

Follow-up to [803], [43662].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51188


git-svn-id: http://core.svn.wordpress.org/trunk@50797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 04:29:56 +00:00
joedolson daa1cbbbfe Media: Adapt response shape depending on type of query.
Restore inheriting the backbone fetch in the media library and adapt the AJAX response according to the action performed in the media query.

In [51145], the response shape was restored to the original shape, and a custom fetch was added to handle assigning the totalAttachments information in the collection. The custom fetch triggered a new set of bugs relating to zero-sized collections and loading individual images. 

props adamsilverstein, ryelle, peterwilsoncc, Presskopp, desrosj.
Fixes #53421, #53419.
Built from https://develop.svn.wordpress.org/trunk@51187


git-svn-id: http://core.svn.wordpress.org/trunk@50796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-20 23:27:01 +00:00
Sergey Biryukov 21bb743811 Tests: Use more appropriate assertions in `clean_dirsize_cache()` tests.
Follow-up to [49212], [49616], [49628], [49630].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51186


git-svn-id: http://core.svn.wordpress.org/trunk@50795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-20 00:25:59 +00:00
Sergey Biryukov 0e5a98eec5 Docs: Correct DocBlock formatting for `Core_Upgrader::upgrade()`.
Document the `$auto_update_settings` parameter of the `after_core_auto_updates_settings` action.

Follow-up to [49254].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51185


git-svn-id: http://core.svn.wordpress.org/trunk@50794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-19 21:37:57 +00:00
Sergey Biryukov 6c01c2a864 Docs: Add a reference to `WP_Site_Query::__construct()` for information on accepted arguments in `get_sites()`.
Synchronize the documentation between two places, use `WP_Site_Query::__construct()` as the canonical source.

Follow-up to [37616].

Props birgire, felipeelia, audrasjb.
Fixes #42156.
Built from https://develop.svn.wordpress.org/trunk@51184


git-svn-id: http://core.svn.wordpress.org/trunk@50793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-19 20:57:01 +00:00
Sergey Biryukov 5f30098a1d REST API: Decode single and double quote entities in widget names and descriptions.
Follow-up to [51174], [51175].

Props ocean90, ramonopoly.
Fixes #53407.
Built from https://develop.svn.wordpress.org/trunk@51183


git-svn-id: http://core.svn.wordpress.org/trunk@50792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 15:52:56 +00:00
Sergey Biryukov e127bcde70 Themes: Make sure `get_file_data()` recognizes headers prefixed by `<?php` tag.
This allows for using headers in the format of `<?php // Template Name: Something ?>`, which previously could not be recognized correctly.

Props dd32, m_uysl, thomas-vitale, boblinthorst.
Fixes #33387.
Built from https://develop.svn.wordpress.org/trunk@51182


git-svn-id: http://core.svn.wordpress.org/trunk@50791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 14:03:58 +00:00
Sergey Biryukov 87c740b086 Tests: Correct `svn:eol-style` property for test data with CR line endings.
Follow-up to [703/tests], [704/tests], [46586].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51181


git-svn-id: http://core.svn.wordpress.org/trunk@50790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 13:58:58 +00:00
Sergey Biryukov 4ccc58801d Upgrade/Install: Deactivate the Gutenberg plugin if its version is 10.7 or lower.
This avoids a fatal error due to `WP_Block_Template` class redeclaration when updating to WordPress 5.8 with an older version of Gutenberg activated.

Follow-up to [35582] for the REST API plugin.

Props hellofromTonya, oglekler, azaozz, desrosj, pbiron, jorbin, youknowriad, TimothyBlynJacobs, Clorith, markparnell.
See #53432.
Built from https://develop.svn.wordpress.org/trunk@51180


git-svn-id: http://core.svn.wordpress.org/trunk@50789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 12:14:01 +00:00
desrosj 7369505689 Build/Test Tools: Use Git when fetching the WordPress Importer for use in tests.
This switches to using Git in the local Docker environment install script to check out a copy of the WordPress Importer plugin for use in unit tests.

Previously, SVN was used and the commands were not correctly run within the Docker container. The container does not actually have SVN installed, and the script was only working when the machine running the command had SVN present.

Props czapla, alexstine, jnylen0, francina, desrosj.
Fixes #52909.
Built from https://develop.svn.wordpress.org/trunk@51179


git-svn-id: http://core.svn.wordpress.org/trunk@50788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 17:58:57 +00:00
Sergey Biryukov 7d3b5dfb17 Coding Standards: Bring some consistency to HTML formatting in `wp-admin/comment.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@51178


git-svn-id: http://core.svn.wordpress.org/trunk@50787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 14:49:58 +00:00
Sergey Biryukov 6a163e199a Administration: Consistently escape `admin_url()` links.
Props chintan1896, mukesh27.
Fixes #53426.
Built from https://develop.svn.wordpress.org/trunk@51177


git-svn-id: http://core.svn.wordpress.org/trunk@50786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 14:37:00 +00:00
Sergey Biryukov 1a5a8c23b8 Editor: Include Cover block in the list of block types registered using metadata files.
This ensures that block stylesheets are rendered properly when `should_load_separate_core_block_assets` filter is turned on.

Follow-up to [50824], [50836].

Props walbo.
Fixes #53440.
Built from https://develop.svn.wordpress.org/trunk@51176


git-svn-id: http://core.svn.wordpress.org/trunk@50785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:57:56 +00:00
Sergey Biryukov 29ba355256 Coding Standards: Fix WPCS issue in [51174].
See #53407.
Built from https://develop.svn.wordpress.org/trunk@51175


git-svn-id: http://core.svn.wordpress.org/trunk@50784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:33:58 +00:00
Sergey Biryukov 9f1145b8ae REST API: Decode HTML entities in widget names and descriptions in widget types controller.
Follow-up to [50995].

Props ramonopoly, noisysocks, spacedmonkey, justinahinon, audrasjb, SergeyBiryukov.
Fixes #53407.
Built from https://develop.svn.wordpress.org/trunk@51174


git-svn-id: http://core.svn.wordpress.org/trunk@50783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:30:00 +00:00
desrosj fcd47d289e Build/Test Tools: Ignore sourceMaps for non WordPress Core files.
If a custom plugin or theme exists in the `build/wp-content` directory with a sourcemap, the build` script is currently returning a warning and failing.

This improves the `verify:source-maps` task in Grunt to ignore directories and files that do not belong to WordPress Core.

Props ryelle, afragen, johnbillion.
Fixes #52689.
Built from https://develop.svn.wordpress.org/trunk@51173


git-svn-id: http://core.svn.wordpress.org/trunk@50782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 22:57:59 +00:00
Sergey Biryukov f6bff0572f Tests: Make some optional parameters required in unit tests for previous/next attachment links.
This resolves a "Deprecated: Required parameter follows optional parameter" notice on PHP 8.

Follow-up to [48794], [51122].

See #45708, #52625.
Built from https://develop.svn.wordpress.org/trunk@51172


git-svn-id: http://core.svn.wordpress.org/trunk@50781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 17:31:59 +00:00
Sergey Biryukov 07737d2d8d External Libraries: Upgrade PHPMailer to version 6.5.0.
Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.4.1...v6.5.0

Props ayeshrajans, Synchro.
Fixes #53430.
Built from https://develop.svn.wordpress.org/trunk@51169


git-svn-id: http://core.svn.wordpress.org/trunk@50778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 17:02:59 +00:00
Sergey Biryukov b27fbee0f3 Docs: Update syntax for some multi-line comments per the documentation standards.
Follow-up to [51003], [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51168


git-svn-id: http://core.svn.wordpress.org/trunk@50777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 09:42:56 +00:00
Sergey Biryukov 5ffd5d6e9b Editor: Check if `supports` metadata key is defined before migrating typography keys.
This avoids an "Undefined index" PHP notice on blocks without a `supports` key in `block.json`.

Follow-up to [51089], [51153], [51159]. 

Props walbo.
Fixes #53416.
Built from https://develop.svn.wordpress.org/trunk@51167


git-svn-id: http://core.svn.wordpress.org/trunk@50776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 21:37:58 +00:00
Sergey Biryukov d32aa67e80 Docs: Update syntax for multi-line comment in `wp_generate_attachment_metadata()` per the documentation standards.
Follow-up to [23766], [25968], [35554], [51162].

Props hellofromTonya.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51166


git-svn-id: http://core.svn.wordpress.org/trunk@50775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 19:10:58 +00:00
desrosj 282a246085 Post WordPress 5.8 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@51165


git-svn-id: http://core.svn.wordpress.org/trunk@50774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 18:05:58 +00:00
desrosj 5ff9de5830 WordPress 5.8 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@51164


git-svn-id: http://core.svn.wordpress.org/trunk@50773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 17:40:57 +00:00
Sergey Biryukov 8bb6b05d78 Quick/Bulk Edit: Ensure that `$post_ids` variable is initialized ahead of usage.
This brings some consistency between similar fragments of `wp-admin/edit.php` and `wp-admin/upload.php`.

Follow-up to [51111], [51161].

See #39589, #53411.
Built from https://develop.svn.wordpress.org/trunk@51163


git-svn-id: http://core.svn.wordpress.org/trunk@50772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 17:04:56 +00:00
Sergey Biryukov 4803207ba1 Media: Make sure `wp_generate_attachment_metadata()` always returns an array.
This matches the documentation for the filter of the same name.

Previously, the function could return `false` for an audio or video attachment that does not exist in the local filesystem.

Props Chouby, SergeyBiryukov.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51162


git-svn-id: http://core.svn.wordpress.org/trunk@50771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:52:56 +00:00
davidbaumwald 870a494015 Media: Ensure `$post_ids` is evaluated properly when processing bulk actions.
After [51111], the `$post_ids` variable is now initialized as an empty array when processing a bulk action.  As such, the original check using `isset` on `$post_ids` will always evaluate to `true`.  This change swaps the `isset` checks for `empty` to check array length instead.

Props david.binda, hellofromTonya.
Fixes #53411.
Built from https://develop.svn.wordpress.org/trunk@51161


git-svn-id: http://core.svn.wordpress.org/trunk@50770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:51:59 +00:00
Sergey Biryukov 84d822fc46 I18N: Remove redundant `default` text domain parameter in some `__()` calls.
Follow-up to [43919], [44262], [48141], [50259].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51160


git-svn-id: http://core.svn.wordpress.org/trunk@50769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:16:57 +00:00
Sergey Biryukov 200a5058e0 Docs: Add missing documentation for `wp_migrate_old_typography_shape()`.
Follow-up to [51089].

See #52991, #52628.
Built from https://develop.svn.wordpress.org/trunk@51159


git-svn-id: http://core.svn.wordpress.org/trunk@50768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:04:58 +00:00
Sergey Biryukov 0def70a94c Coding Standards: Use consistent formatting for `_wp_posts_page_notice()` and `_wp_block_editor_posts_page_notice()`.
Remove redundant casting to `int` for post ID, which is always an integer.

Follow-up to [51116].

See #45537, #52627.
Built from https://develop.svn.wordpress.org/trunk@51158


git-svn-id: http://core.svn.wordpress.org/trunk@50767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:50:58 +00:00
Sergey Biryukov 4811dad603 I18N: Use consistent pattern for placeholder references in translator comments for some bundled theme strings.
Follow-up to [42827], [44562], [50234].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51157


git-svn-id: http://core.svn.wordpress.org/trunk@50766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:38:57 +00:00
youknowriad b018c55899 Block Editor: Second batch of fixes for 5.8 beta 2
This includes:

 - Fix regression emptying post content block in template mode.
 - Legacy Widget: Don't display "No preview" when widget has image tags.

See #53397. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@50765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:30:24 +00:00
Sergey Biryukov aed608b98c Coding Standards: Remove a one-time `$message` variable in WordPress version requirement notices for bundled themes.
This makes the formatting of these messages more consistent.

Follow-up to [23816], [51154].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51155


git-svn-id: http://core.svn.wordpress.org/trunk@50764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:24:58 +00:00
Sergey Biryukov e05ffb46a5 Coding Standards: Remove a one-time `$message` variable in some `_doing_it_wrong()` calls.
This brings some consistency with most other calls.

Follow-up to [23378], [25605], [34745], [36219], [44108], [46111], [48156].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51154


git-svn-id: http://core.svn.wordpress.org/trunk@50763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:22:58 +00:00
Sergey Biryukov 4d3ddd056f Editor, I18N: Remove code from a translatable string in `wp_migrate_old_typography_shape()`.
Replace a `trigger_error()` call with `_doing_it_wrong()` for consistency with how similar messages are displayed elsewhere in core.

Follow-up to [51089].

See #52991.
Built from https://develop.svn.wordpress.org/trunk@51153


git-svn-id: http://core.svn.wordpress.org/trunk@50762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 14:02:59 +00:00
Sergey Biryukov 408db6120e Docs: Document the `VALID_ORIGINS` constant in `WP_Theme_JSON`.
Follow-up to [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51152


git-svn-id: http://core.svn.wordpress.org/trunk@50761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 11:25:08 +00:00
Sergey Biryukov 6276e68c6c Docs: Document the usage of `$wp_embed` global in `WP_oEmbed_Controller::get_proxy_item()`.
Follow-up to [48135].

Fixes #52628.
Built from https://develop.svn.wordpress.org/trunk@51151


git-svn-id: http://core.svn.wordpress.org/trunk@50760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:24:57 +00:00
Sergey Biryukov aba17cd9ea Docs: Document the usage of `$_wp_current_template_content` global in a few block template functions.
Follow-up to [51003], [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51150


git-svn-id: http://core.svn.wordpress.org/trunk@50759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:21:57 +00:00
youknowriad c114304471 Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes:

**Various**

 - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536
 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896
 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589
 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581
 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088

**Template Editor**

 - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427
 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451

**Widgets Editor**

 - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569
 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534
 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573
 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585
 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572
 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501
 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625
 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580

**Global Styles (theme.json)**
 
 - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622
 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627

**Performance**

 - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 08:52:30 +00:00
desrosj f0ac297720 Editor: Replace a Gutenberg specific function with the Core equivalent.
This replaces a stray instance of `gutenberg_experimental_set()` with the WordPress Core version of this function, `_wp_array_set()`.

A stray `gutenberg` text domain is also removed from a `__()` call.

Props walbo, chaion07, JeffPaul.
Fixes #53369.
Built from https://develop.svn.wordpress.org/trunk@51148


git-svn-id: http://core.svn.wordpress.org/trunk@50757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:44:58 +00:00
desrosj e0e19035dc Coding Standards: Apply some alignment fixes.
Follow up to [51145].
See #50105.
Built from https://develop.svn.wordpress.org/trunk@51147


git-svn-id: http://core.svn.wordpress.org/trunk@50756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:43:02 +00:00
desrosj 8fad82a2d6 Build/Test Tools: Replace the deprecated `@babel/polyfill`.
This replaces the dependency of the deprecated `@babel/polyfill` package with the `core-js` package through `@wordpress/babel-preset-default`.

Previously, the file consisted of a generalized group of polyfills, and not all of them were required. This change allows the contents of this file to be built according to the exact needs as dictated by the `@wordpress/babel-preset-default` package, which takes into account the current browser support.

Props gziolo, youknowriad. 
Fixes #52941.
Built from https://develop.svn.wordpress.org/trunk@51146


git-svn-id: http://core.svn.wordpress.org/trunk@50755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:18:11 +00:00
joedolson fe1cb3ff0d Media: Restore AJAX response data shape in media library.
Restore the original shape of the AJAX response data in the media library after removing infinite scroll, and pass total number of attachments in the response headers `X-WP-Total` and `X-WP-TotalPages`. 

Improve backwards compatibility for plugins intercepting the ajax response. Headers match the structure and count calculation used in REST API responses.

Fix an issue with hiding the spinner after the load is completed and ensure that the load more view is created when changing tabs in the media library modal.

Follow up to [50829].

props adamsilverstein, spacedmonkey, joedolson.
Fixes #50105.
Built from https://develop.svn.wordpress.org/trunk@51145


git-svn-id: http://core.svn.wordpress.org/trunk@50754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:50:57 +00:00
Aaron Jorbin 5d9ca9dc68 Block Editor: Prevent duplicate queries
When passing args to `WP_Query::__construct` method (in this case, but creating a `new WP_Query`, this one internally executes the `WP_Query::get_posts` method and stores the result in the `WP_Query::posts` property. When calling the `WP_Query::get_posts` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.

This was introduced in [51003].

Props david.binda, jorbin.
Fixes #53280. See #53176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:39:57 +00:00
desrosj b7489425cb Site Health: Display a list of file formats supported by the GD library.
This adds the list of file formats supported by the GD library to the Media Handling section in Site Health.

This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Follow up to [50817].
Props adamsilverstein, jorbin. 
Fixes #53022.
Built from https://develop.svn.wordpress.org/trunk@51143


git-svn-id: http://core.svn.wordpress.org/trunk@50752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 18:59:59 +00:00
Sergey Biryukov 05e98e28f3 Docs: Update documentation for some `WP_Customize_Widgets` methods per the documentation standards.
* Add missing `@since` tags for the `$id_base` parameter of ::sanitize_widget_instance()` and `::sanitize_widget_js_instance()`.
* Document the usage of `$wp_widget_factory` global in `::sanitize_widget_instance()`.
* Use multi-line comment syntax for a comment in `::enqueue_scripts()`.

Follow-up to [50996], [51141].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51142


git-svn-id: http://core.svn.wordpress.org/trunk@50751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 15:16:58 +00:00
Sergey Biryukov 2e0e705d4c Docs: Document the usage of `$wp_widget_factory` global in `WP_Customize_Widgets::sanitize_widget_instance()`.
Follow-up to [50996].

Props jontyravi, audrasjb.
Fixes #53394.
Built from https://develop.svn.wordpress.org/trunk@51141


git-svn-id: http://core.svn.wordpress.org/trunk@50750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 11:02:57 +00:00
Sergey Biryukov 9f91305af2 Tests: Fix typo in a `retrieve_widgets()` test name.
Correct parameter description for `data_wp_widget_get_field_name()`.

Follow-up to [34780], [41555].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51140


git-svn-id: http://core.svn.wordpress.org/trunk@50749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-13 16:28:58 +00:00
Sergey Biryukov 39e041b877 Tests: Fix typo in a `get_bookmarks()` test name.
Follow-up to [44546].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51139


git-svn-id: http://core.svn.wordpress.org/trunk@50748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-12 15:49:02 +00:00
Sergey Biryukov 41e3cb04ad Docs: Correct DocBlock formatting for some revision tests.
Follow-up to [50949], [51124].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51138


git-svn-id: http://core.svn.wordpress.org/trunk@50747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-11 12:36:00 +00:00
Sergey Biryukov 3c2c27c637 Tests: Use `assertSameSets()` in some newly introduced tests.
This ensures that not only the array values being compared are equal, but also that their type is the same.

Going forward, stricter type checking by using `assertSameSets()` or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.

Follow-up to [48939], [49925], [50157], [50959], [50960], [50995], [51079].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51137


git-svn-id: http://core.svn.wordpress.org/trunk@50746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-10 19:20:01 +00:00
Peter Wilson 8df65cdbe9 Widgets: Improve unit tests for RSS Widget.
Prevent unit tests from making HTTP requests to wordpress.org. Specify URLs as https rather than http.

Follow up to [51107].

Props hellofromTonya.
Fixes #53278.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 23:51:56 +00:00
Sergey Biryukov adf23b3ed5 Tests: Ignore EOL differences in some tests using multiline string assertions.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Follow-up to [48466], [50995], [51079].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51135


git-svn-id: http://core.svn.wordpress.org/trunk@50744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 19:42:58 +00:00
desrosj 8c4cff0708 Upgrade/Install: Built files should not be included in the `$_old_files` list.
Follow up to [51133].
Unprops desrosj.
See #53367.
Built from https://develop.svn.wordpress.org/trunk@51134


git-svn-id: http://core.svn.wordpress.org/trunk@50743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 16:22:03 +00:00
desrosj f7c74d3994 Upgrade/Install: Update the `$_old_files` list for 5.8.
Follow up to [50761], [50794], [51021].
Props kapilpaul, desrosj.
See #52991, #52846, #53246.
Fixes #53367.
Built from https://develop.svn.wordpress.org/trunk@51133


git-svn-id: http://core.svn.wordpress.org/trunk@50742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 15:54:57 +00:00
desrosj f9aaec8f73 Post WordPress 5.8 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@51132


git-svn-id: http://core.svn.wordpress.org/trunk@50741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 02:40:58 +00:00
desrosj 3ee24bd3bf WordPress 5.8 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@51131


git-svn-id: http://core.svn.wordpress.org/trunk@50740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 02:02:58 +00:00
desrosj 15ee62321a Build/Test Tools: Silence jQuery Migrate console warnings when running E2E tests.
These warnings will still be visible in the browser console. The majority of the warnings are coming from jQuery UI, which is still waiting for a new update to be released that is jQuery >= 3.0 friendly.

This change makes the E2E test results more readable without having to tread through the large number of warnings.

Props isabel_brison.
Fixes #52860.
Built from https://develop.svn.wordpress.org/trunk@51130


git-svn-id: http://core.svn.wordpress.org/trunk@50739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 01:36:57 +00:00
antpb 06cddbd3b3 Privacy: Improve naming of user confimed action email filters.
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.

They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.

Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes #44314.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 01:35:58 +00:00
desrosj af81b98b92 Tests: Introduce some E2E tests for the Quick Draft dashboard widget.
Props isabel_brison, johnbillion.
Fixes #523905.
Built from https://develop.svn.wordpress.org/trunk@51128


git-svn-id: http://core.svn.wordpress.org/trunk@50737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 00:20:56 +00:00
whyisjake 2e36162a20 Widgets: Don't decode HTML entities ahead of the widget constructor.
This reverts the changes from [51114]. 

See #53138.

Unprops whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@50736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:40:00 +00:00
desrosj 37652569e4 Login and Registration: Improve the unknown username error message
The new message is more clear and makes the next step more clear to the user. 

Props dd32, SergeyBiryukov, audrasjb, desrosj, dlh, marybaum, chanthaboune, jeffpaul.
Fixes #52915.
Built from https://develop.svn.wordpress.org/trunk@51126


git-svn-id: http://core.svn.wordpress.org/trunk@50735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:34:58 +00:00
whyisjake 32ecbd061e Permalinks: Revert the changes stemming from pagination limits.
In [51118], an attempt was made to add pagination limits. The added tests need to be updated to ensure that they pass with the new changes.

Reverts [51118].

See #50233.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:32:56 +00:00
whyisjake 011a598fa1 Revisions: Check and return errors for insertions to revisions.
Fixes #30009.

Props rmccue, adamsilverstein, coreymckrill, whyisjake.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:24:57 +00:00
antpb 38e4f333c0 Media: Allow multi-uploads in Galleries.
Previously, when more than one media item was uploaded using a gallery, failures occurred on the second upload.

Props glendaviesnz, Mista-Flo, hellofromTonya.
Fixes #53169.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:14:55 +00:00
whyisjake cc26b6f068 Media: Add new functions to return the previous/next attachment links.
New functions:

* get_adjacent_image_link()
* get_next_image_link()
* get_previous_image_link()

Fixes #45708.

Props flixos90, DrewAPicture, mor10, antpb, hellofromTonya, whyisjake.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:13:57 +00:00
antpb bb041c2503 Feeds: Avoid notices in `get_post_comments_feed_link()`.
When an feed request is made to a non-existent page, surpress the notice.

Props dd32, SergeyBiryukov, mukesh27, hellofromTonya.
Fixes #52814.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 23:00:59 +00:00
desrosj bdbda4c306 Coding Standards: Use single quotes when there are no variables within the string.
Follow up to [51117].

See #48743.
Built from https://develop.svn.wordpress.org/trunk@51120


git-svn-id: http://core.svn.wordpress.org/trunk@50729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:55:58 +00:00
desrosj 892e5dd68e Administration: Adjust Internet Explorer message to be a bit more clear.
This moves “Internet Explorer” to the beginning of the sentence introduced in [51117] to make the reason the user is seeing this message more clear.

Props chanthaboune, jeffpaul, desrosj.
Fixes #48743.
Built from https://develop.svn.wordpress.org/trunk@51119


git-svn-id: http://core.svn.wordpress.org/trunk@50728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:54:57 +00:00
whyisjake b672d77e87 Permalinks: Limit pagination for posts with comments.
Additionally, redirect pages back to the source page if comments don't exist.

Props devrekli, carike, sumanm, mukesh27, chaion07, audrasjb, whyisjake, SergeyBiryukov.

Fixes #50233.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:51:01 +00:00
antpb a8321ed2d5 Administration: Introduce dashboard notice to discourage use of out of date browser.
If a browser matches Internet Explorer, the dashboard will display a notice recommending a more modern browser.

Props youknowriad, sabernhardt, afercia, SergeyBiryukov, davidbaumwald, netweb, johnbillion, jeherve.
See #48743.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:47:58 +00:00
whyisjake 71f37fe636 Editor: Ensure that the block editor can be used on the page post type.
Additionally, add a notice for when you are editing the "latest posts" page.

Fixes #45537.

Props cameronjonesweb, swissspidy, hannahmalcolm, Fantasy1125, ArnaudBan, grantmkin, youknowriad, knutsp, SergeyBiryukov, audrasjb, whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@50725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:38:58 +00:00
whyisjake 1b7df89e93 Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`.

See [33016].

Fixes #40401.

Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:21:57 +00:00
whyisjake 81c4c4138c Widgets: Ensure that HTML entities are converted in widget descriptions.
Fixes #53138.

Props justinahinon, audrasjb.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:17:57 +00:00
desrosj b60a512de4 Emoji: Update the Twemoji library to version 13.1.0.
This version introduces support for the latest Emoji added in version Emoji 13.1, which includes “face in clouds”, “face exhaling”, and of course, “face with spiral eyes”.

A new corresponding folder has been pushed to WordPress.org in [dotorg:17419].

Rages deep within, ❤️‍🔥.

Props kraftbj., desrosj.
Fixes #52852.
Built from https://develop.svn.wordpress.org/trunk@51113


git-svn-id: http://core.svn.wordpress.org/trunk@50722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:15:12 +00:00
whyisjake fc410fab37 Build/Test Tools: Ensure that we are using https:// urls.
Fix from automated install.

See [51111], #39589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:12:56 +00:00
whyisjake 2d6e474c85 Media: Ensure that post_id variable is initiated ahead of usage.
This prevents warnings when using custom bulk actions in the media library.

Props gitlost, achbed, Boniu91, wpgurudev, hellofromTonya.

Fixes #39589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:08:09 +00:00
ryelle 8ace500967 Twenty Thirteen: Add "No Shadow" style to button block.
This creates a new block style without a shadow, and fixes colors on outline buttons.

Props melchoyce, kjellr, scruffian.
Fixes #51223.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 20:37:58 +00:00
ryelle 91c19c69c2 Block Editor: Ignore generated CSS files in Page List and Post Template blocks.
Add SVN ignore property to match existing rule in `.gitignore`.

Follow up to [51101], [51105].
See #52991, #53309.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 20:09:57 +00:00
ryelle 57fa6fde4e Login and Registration: Wrap long site titles to a new line.
Props sumitsingh, geekpress, sabernhardt.
Fixes #52776.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 19:46:58 +00:00
Aaron Jorbin e2104af75e Widgets: Prevent infinite loop in PHP8+ if the URL for the widget instance is incorrectly defined
This checks to make sure $link isn't empty before attempting to manipulate it.  A simple test to demonstrate this can be seen at https://3v4l.org/PgSZg. Unit tests for both what already works and what is fixed by this change.

Props hellofromTonya, dd32, peterwilsoncc.
Fixes #53278.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 19:35:57 +00:00
ryelle ba5e7a0fb9 Bundled Themes: Introduce block patterns for Twenty Ten.
Props beafialho, kjellr, melchoyce, danieldudzic, onemaggie.
Fixes #51107.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 18:53:59 +00:00
youknowriad f47e79bc7d Block Editor: Include the page list block server-side code.
On a previous package update, this block's server-side code has been missed.
This was causing the block to not render properly.

Props Chouby, desrosj, mcsf.
Fixes #53309.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 18:13:01 +00:00
youknowriad 3cd3ac227a Block Editor: Fix typo in the typography block support.
The function wp_typography_get_css_variable_inline_style has been renamed when backported to Core.
But its usage was untouched causing potential php errors on the frontend.

See #52991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 18:06:59 +00:00
ryelle ecc13d3de2 Bundled Themes: Introduce block patterns for Twenty Eleven.
Props beafialho, kjellr, melchoyce, audrasjb.
Fixes #51106.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 18:03:59 +00:00
youknowriad 62be41c079 Block Editor: Allow themes to add inline styles for all blocks when using lazy styles loading.
Props aristath.
Fixes #53358.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:36:58 +00:00
youknowriad 1a7f28b3cd Block Editor: Package updates for WordPress 5.8 beta 1 (batch2).
This includes the following fixes:

 - Fix inspector opening when clicking outside the widget areas
 - Assume light theme when a transparent background is used
 - Make Post blocks non editable inside Query block
 - Rename QueryLoop to PostTemplate block

Props ntsekouras.
See #52991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:33:22 +00:00
desrosj a44c69354d Twenty Twenty: Regenerate the RTL editor stylesheet.
This applies the change made in [51095] to the RTL stylesheet.

See #50120.
Built from https://develop.svn.wordpress.org/trunk@51100


git-svn-id: http://core.svn.wordpress.org/trunk@50709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:28:57 +00:00
desrosj 2f76f3279b Build/Test Tools: Update `devDependencies` for bundled themes.
This applies several minor updates bring `devDependencies` to their latest versions in Twenty Twenty-One, Twenty Twenty, and Twenty Nineteen.

Several other packages are also having their versions bumped as a result of running `npm audit fix`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@51099


git-svn-id: http://core.svn.wordpress.org/trunk@50708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:25:57 +00:00
ryelle bb21c738ee Twenty Nineteen: Set a default color for button links in the editor.
Props mikejolley, poena, boniu91.
Fixes #52555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:21:59 +00:00
desrosj 7af8858ec7 Build/Test Tools: Update several `devDependencies`.
This updates `qunit`, `sass`, and `uglify-js` to thei latest versions.

Several other packages are also having their versions bumped as a result of running `npm audit fix`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@51097


git-svn-id: http://core.svn.wordpress.org/trunk@50706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:15:15 +00:00
ryelle ebb9bdc7ca Twenty Nineteen: Fix pullquote styling in editor when block has alignment.
Props devnel, sabernhardt.
Fixes #53112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 16:50:57 +00:00
ryelle f512feabe0 Twenty Twenty: Ensure custom primary color is applied to text in the editor.
Update the specificity of the custom CSS to match the editor styles. This overrides the default primary color with the selected custom color, matching the frontend display.

Props sabernhardt, notlaura.
Fixes #50120.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 15:06:58 +00:00
desrosj bac6a83417 Script Loader: Fix 404 errors for the `jquery-masonry` script when `SCRIPT_DEBUG` is `true`.
The unminified version of `jquery-masonry` has never been included in Core. This hard codes the `.min` into the file source to prevent these errors.

Props pondermatic, isabel_brison, SergeyBiryukov, azaozz, desrosj.
Fixes #47353.
Built from https://develop.svn.wordpress.org/trunk@51094


git-svn-id: http://core.svn.wordpress.org/trunk@50703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 14:59:59 +00:00
desrosj ef4b42b03b Coding Standards: Apply an alignment fix.
Follow up to [51021].

See #53246.
Built from https://develop.svn.wordpress.org/trunk@51093


git-svn-id: http://core.svn.wordpress.org/trunk@50702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 13:22:57 +00:00
Sergey Biryukov 08f5a1b098 Upgrade/Install: Remove parsing of `readme.txt` files for plugin or theme requirements.
This affects:
* `validate_plugin_requirements()`
* `validate_theme_requirements()`

Historically, the `Requires PHP` header was introduced in #meta2952 for the Plugin Directory first, so at the time it made sense to have it defined in the same place as `Requires at least`, which only existed in `readme.txt`. 

Since parsing of PHP and WordPress requirements was later added to WordPress core, the core should retrieve all the necessary data from the main plugin or theme file and not from `readme.txt`, which only contains the data meant for the Plugin or Theme Directory.

The recommended place for `Requires PHP` and `Requires at least` headers is as follows:
* The plugin's main PHP file
* The theme's `style.css` file

The place for the `Tested up to` header remains in `readme.txt` for the time being, as it's not used by WordPress core.

Follow-up to [44978], [45546], [47573], [47574], [meta5841], [meta9050].

Props afragen, Otto42, joyously, williampatton, audrasjb.
Fixes #48520. See #48515, #meta2952, #meta4514, #meta4621.
Built from https://develop.svn.wordpress.org/trunk@51092


git-svn-id: http://core.svn.wordpress.org/trunk@50701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 10:13:00 +00:00
youknowriad 55f3de101b Block Editor: Add the Site Logo block's server implementation.
Props aristath, timothyblynjacobs, ocean90.
Fixes #53247.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 08:27:58 +00:00
youknowriad 446dd1768a Block Editor: Add a type property to allow Core to identify the source of the editor styles.
Gutenberg plugin need to override the editor styles provided by core selectively,
this added property allows it to do so without committing to a public API.

Props nosolosw, jorgefilipecosta.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 08:15:57 +00:00
youknowriad 1516d05128 Block Editor: Package updates for 5.8 beta 1.
This includes the following fixes:


Widgets Editor:
  - Load widgets.php https://github.com/WordPress/gutenberg/pull/32299
 - Fix Legacy Widget Preview https://github.com/WordPress/gutenberg/pull/32300
 - Fix error when saving empty Legacy Widget block https://github.com/WordPress/gutenberg/pull/32359

Widget blocks in the customizer: 
 - Fix deselection blocks when the inspector is open https://github.com/WordPress/gutenberg/pull/32361
 - Display wide widgets as popovers https://github.com/WordPress/gutenberg/pull/31736

Global Styles:
 - Align classNames generation between client and server https://github.com/WordPress/gutenberg/pull/32352
 - Group typography block supports https://github.com/WordPress/gutenberg/pull/32252 https://github.com/WordPress/gutenberg/pull/32444 https://github.com/WordPress/gutenberg/pull/32459
 - Make theme.json syntax errors more visible to the users https://github.com/WordPress/gutenberg/pull/32404


Template Editor:
  - Update the appearance of the template details https://github.com/WordPress/gutenberg/pull/32042
  - Fix layout definition https://github.com/WordPress/gutenberg/pull/32425
  - Fix grouping post content block https://github.com/WordPress/gutenberg/pull/32453

Miscellaneous:
 - Prevent saving when the post is locked https://github.com/WordPress/gutenberg/pull/32341
 - Fix allowed block patterns selector https://github.com/WordPress/gutenberg/pull/32376
 - Fix wrong results in the Post Author picker https://github.com/WordPress/gutenberg/pull/32344
 - Fix notices position in top toolbar mode https://github.com/WordPress/gutenberg/pull/32238
 - Allow non-latin characters in post slugs https://github.com/WordPress/gutenberg/pull/32232
 - Fix Random collapse of the color settings panel https://github.com/WordPress/gutenberg/pull/32388
 - Fix theme logo theme mode not being removed on theme removal https://github.com/WordPress/gutenberg/pull/32370
 - Fix block alignment styles in the editor https://github.com/WordPress/gutenberg/pull/32454
 - Fix some block toolbar overlaps https://github.com/WordPress/gutenberg/pull/32424
 - Fix content loss when switching list types https://github.com/WordPress/gutenberg/pull/32432


Performance:
 - Improve the performance of buttons block https://github.com/WordPress/gutenberg/pull/32356
 - Improve the performance of the container blocks https://github.com/WordPress/gutenberg/pull/32380

Props noisysocks, nosolosw, jorgefilipecosta.
See #52991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 08:09:53 +00:00
noisysocks bbc2d09a9f Make new WordPress installations use blocks in widget areas instead of widgets
Modifies `wp_install_defaults()` so that when you install a new WordPress site you
have block in your widget areas, not widgets.

Fixes #53324.
Props isabel_brison, hellofromtonya, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 01:55:57 +00:00
Aaron Jorbin f3dc033350 Boostrap/Load: Add filter to allow disabling of object cache
In [37626] a filter was added to allow disabling the advanced cache dropin, but no similar filter was added for the object cache dropin. This corrects that oversight.

Fixes #53322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 01:45:57 +00:00
joedolson e53ace6056 Application Passwords: Allow enter key to submit profile form.
Fix the enter key in profile form fields moving focus to the application password input instead of submitting the profile update for. Replace the submit button type used for application passwords with `button type="button"` and ensure that the enter key's native behavior isn't overwritten.

props audrasjb, alexstine, promz, sabernhardt.
Fixes #52849.
Built from https://develop.svn.wordpress.org/trunk@51086


git-svn-id: http://core.svn.wordpress.org/trunk@50695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:49:58 +00:00
Andrew Ozz 34cfd7e4ad TinyMCE: Don't attempt to initialize the same instance twice. Follow up to [51082].
See #52133, #52050.
Built from https://develop.svn.wordpress.org/trunk@51085


git-svn-id: http://core.svn.wordpress.org/trunk@50694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:21:57 +00:00
joedolson 82f31a97cb Coding Standards: Extraneous white space at end of line.
Fixes a minor coding standards issue.

Follow up to [51082].

See #51189.
Built from https://develop.svn.wordpress.org/trunk@51084


git-svn-id: http://core.svn.wordpress.org/trunk@50693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:15:58 +00:00
joedolson 637282bb0f Themes: Fix accessibility issues with controls in themes screen.
Add accessible names to several theme controls so provide better context for screen reader users. Change theme details element into a button that can receive focus. Ensure focus is set back on existing theme when theme details modal is closed.

props alexstine, poena.
Fixes #52649.
Built from https://develop.svn.wordpress.org/trunk@51083


git-svn-id: http://core.svn.wordpress.org/trunk@50692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:10:57 +00:00
Andrew Ozz 47fb9c7f3d TinyMCE: Fix initialization when the editor is in a postbox by delaying it until `document.readyState === 'complete'`.
Props metalandcoffee, desrosj, patkemper, herrvigg, spikeuk1, dway, mkdgs, azaozz.
Fixes #52133, #52050.
Built from https://develop.svn.wordpress.org/trunk@51082


git-svn-id: http://core.svn.wordpress.org/trunk@50691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:07:57 +00:00
joedolson 50fd820621 Comments: Return valid comment reply link if comments are paginated.
Fix the link returned by `get_comment_reply_link()` so the link points to the correct page of comments when links are paginated. While this link is normally overridden by the comment-reply script, if that script is disabled, the link would point to a location that did not exist when comments were paginated.

props MrPauloEn, paaggeli, alexstine, engahmeds3ed.
Fixes #51189.
Built from https://develop.svn.wordpress.org/trunk@51081


git-svn-id: http://core.svn.wordpress.org/trunk@50690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 21:49:59 +00:00
Sergey Biryukov aeebd14fe2 Comments: Escape comment author's email in the Edit Comment form.
Technically, this is redundant, as the `comment_author`, `comment_author_email`, and `comment_author_url` fields are already escaped via `get_comment_to_edit()` before the form is displayed. 

However, this brings some consistency with the `comment_author` and `comment_author_url` fields being escaped in the same form.

Follow-up to [11721].

Props utsav72640.
Fixes #53349.
Built from https://develop.svn.wordpress.org/trunk@51080


git-svn-id: http://core.svn.wordpress.org/trunk@50689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 18:47:02 +00:00
Sergey Biryukov 3642c401b6 Tests: Use `assertSame()` in some newly introduced tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [50380], [50959], [50960], [50973], [50993], [51003], [51051], [51054].

See #52482.
Built from https://develop.svn.wordpress.org/trunk@51079


git-svn-id: http://core.svn.wordpress.org/trunk@50688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 11:18:00 +00:00
Sergey Biryukov 6304c9ba7f External Libraries: Update the Requests library to version 1.8.1.
This is a minor update, with the most important change being that the version constant in the `Requests` class is now correct.

Release notes: https://github.com/WordPress/Requests/releases/tag/v1.8.1

For a full list of changes in this update, see the Requests GitHub:
https://github.com/WordPress/Requests/compare/v1.8.0...v1.8.1

Follow-up to [50842].

Props kapilpaul, jrf, schlessera, mbabker.
Fixes #53334.
Built from https://develop.svn.wordpress.org/trunk@51078


git-svn-id: http://core.svn.wordpress.org/trunk@50687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-06 14:05:56 +00:00
Dominik Schilling ce4da03303 Users: Add user’s locale to password reset link to ensure login screen matches the language of the email.
Props walbo.
See #34281, #52605.
Fixes #53321.
Built from https://develop.svn.wordpress.org/trunk@51077


git-svn-id: http://core.svn.wordpress.org/trunk@50686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-06 12:41:01 +00:00
Aaron Jorbin 5fac9d83a9 Booststrap/Load: Only reference recovery mode email when it can be sent.
The recovery mode email is sent from within the WP_Recovery_Mode::handle_error() method, but that method is only called by the fatal error handler if WP_Recovery_Mode has been initialized. This adjusts the message to only say the email has been sent if it can be sent.

Props reynhartono, stevegrunwell for initial plan.
Fixes #52560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-05 15:46:57 +00:00
Sergey Biryukov 00ac778b90 Coding Standards: Use strict comparison in `wp-admin/options-media.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@51075


git-svn-id: http://core.svn.wordpress.org/trunk@50684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-05 13:57:59 +00:00
Sergey Biryukov 47231831f7 REST API: Restore the `$creating` parameter of `rest_after_save_widget` action.
This is consistent with other similar REST API actions.

Partially reverts [51071], except for DocBlock formatting fixes.

Props TimothyBlynJacobs.
See #53317.
Built from https://develop.svn.wordpress.org/trunk@51074


git-svn-id: http://core.svn.wordpress.org/trunk@50683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 23:13:59 +00:00
ryelle 13d9212bf4 List Tables: Update spacing in action items on small screens.
Switch the display to flex. The action items use their intrinsic space, rather than a fixed grid, which prevents too much space between items on larger mobile screens.

Props arunsathiya, sabernhardt, danfarrow, notlaura, aliveic, y_kolev
Fixes #48546, #47895.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 18:14:56 +00:00
ryelle eaea2f3b45 Twenty Twenty-One: Check for navigation element before using it.
This prevents a javascript error in case the primary navigation has been removed, for example in a child theme.

Props sushmak.
Fixes #52773.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 17:08:00 +00:00
Sergey Biryukov 36cf03ca52 REST API: Rename the `$creating` parameter of `rest_after_save_widget` action to `$update`.
This brings some consistency with similar actions for posts, e.g. `save_post` or `wp_insert_post`.

Follow-up to [51068], [51069].

See #53317.
Built from https://develop.svn.wordpress.org/trunk@51071


git-svn-id: http://core.svn.wordpress.org/trunk@50680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 10:48:56 +00:00
Sergey Biryukov 4e2a6681a0 Coding Standards: Simplify the logic in `WP_Widget::get_field_name()` and `::get_field_id()`.
Includes minor code layout fixes for better readability.

Follow-up to [41292], [50953], [50961].

Props 5ubliminal, solarissmoke, tamlyn, jdgrimes, jorbin, stevenkword, drebbits.web, westonruter, jipmoors, justinahinon, helen, lukecarbis, Mte90, hellofromTonya, SergeyBiryukov.
See #16773, #52627.
Built from https://develop.svn.wordpress.org/trunk@51070


git-svn-id: http://core.svn.wordpress.org/trunk@50679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 10:47:58 +00:00
noisysocks cd4b3a357d Fix failing block editor test
Removes the Meta and Nav Menu widgets from the set of widgets expected by the
test for get_default_block_editor_settings().

Follows [51067].
See #53301.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 05:26:59 +00:00
noisysocks 222541d7c3 REST API: Delete fresh_site option when updating widgets via REST API
Adds new hooks (rest_save_sidebar, rest_delete_widget, rest_after_save_widget)
to the widgets REST API and uses them to delete the fresh_site option when
updating widgets via the REST API. This ensures that starter content isn't
loaded in the Customizer after a user makes changes.

Fixes #53317.
Props kevin940726, garrett-eclipse, andraganescu, hellofromtonya.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 00:45:56 +00:00
noisysocks 6531090038 Enable Meta and Nav Menu widgets in Legacy Widget block
Allows users to insert a Meta or Nav Menu widget using the Legacy Widget block,
as there is not yet a block equivalent for the Meta and Nav Menu widgets.

Fixes #53301.
Props celloexpressions, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 00:40:57 +00:00
Sergey Biryukov f637014b61 Site Health: Remove unnecessary `function_exists()` checks from `WP_Site_Health::get_tests()`.
By the time the tests run, both `wp_is_site_protected_by_basic_auth()` and `rest_url()` functions are available, so there is no need to check for their existence.

Follow-up to [44986], [51057].

Props Clorith, costdev, SergeyBiryukov.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51066


git-svn-id: http://core.svn.wordpress.org/trunk@50675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-03 11:14:56 +00:00
John Blackbourn 3024b85221 Editor: Correct some docblocks added in [50836].
See #50328, #52620.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-03 00:22:58 +00:00
Sergey Biryukov 8e5b3d5a97 Plugins: Make sure Hello Dolly translations are deleted when the plugin is deleted.
Follow-up to [19965], [29856].

Props costdev, Otshelnik-Fm, JeffPaul, SergeyBiryukov.
Fixes #52817.
Built from https://develop.svn.wordpress.org/trunk@51064


git-svn-id: http://core.svn.wordpress.org/trunk@50673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 15:12:58 +00:00
Sergey Biryukov fde119d446 Docs: Correct type for the `$widget` parameter of the `widget_block_content` filter.
Follow-up to [51058].

See #51566.
Built from https://develop.svn.wordpress.org/trunk@51063


git-svn-id: http://core.svn.wordpress.org/trunk@50672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 10:57:57 +00:00
Peter Wilson eeb4f7fcc6 Block Editor: Update script versions.
Follow up to [51051].
See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 02:28:59 +00:00
noisysocks 138fa081a7 Widgets: Add missing actions to widgets block editor
Adds the `'sidebar_admin-setup'`, `'sidebar_admin_page'`, and
`current_theme_supports( 'widgets' )` check to the widgets block editor so that
the block editor screen is more compatible with the classic screen.

Fixes #53288.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 01:57:57 +00:00
noisysocks 5162c8e6a8 REST API: Add 'delete_widget' action to delete widget endpoint
Triggers the 'delete_widget' action to the delete widget endpoint in the REST
API. This aligns with the behaviour in the widgets WP Admin screen.

Fixes #53289.
Props isabel_brison, TimothyBlynJacobs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 01:40:57 +00:00
noisysocks 2fd3f23408 REST API: Fix delete widget endpoint
Makes the `DELETE /wp/v2/widgets/:id?force=1` endpoint actually delete the
widget from the `"widget-$id_base"` option and not just remove it from
`'sidebars_widgets'`.

Fixes #53313.
Props TimothyBlynJacobs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 01:22:57 +00:00
noisysocks 38cea1e659 Widget block: Add `widget_block_content` filter
Adds a new 'widget_block_content' filter to the widget block and hooks
`run_shortcode`, `autoembed`, `do_blocks`, and `do_shortcode` into it by
default. This is simlar to `widget_text_content.`

Fixes #51566.
Props talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 01:18:57 +00:00
Clorith 918610fb88 Site Health: Conditionally run Authorization header test.
The test to confirm if Authorization headers can be used and recognized by WordPress needs to include a username and password combination that WordPress can compare against during the testing phase. The inclusion of credentials here would unfortunately also invalidate any existing basic auth session for the site, for example if the user had added this as an extra layer of security on their back-end.

This test is now skipped if the `wp_is_site_protected_by_basic_auth()` function detects that basic auth is being used, since the act of using basic auth to access the site confirms that this feature is working as expected in the first place.

Props WebDragon, TimothyBlynJacobs, costdev.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51057


git-svn-id: http://core.svn.wordpress.org/trunk@50666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 00:51:57 +00:00
Sergey Biryukov 033c742a4e Block Editor: Load the `WP_Theme_JSON_Resolver` class in `wp-admin/load-styles.php`.
This ensures correct load order when style concatenation is used, e.g. when `SCRIPT_DEBUG` is off.

Additionally, make sure the `WP_CONTENT_DIR` constant is defined for use in `get_theme_root()` via `get_stylesheet_directory()`.

Follow-up to [50992], [51001], [51013].

Props nosolosw.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@51056


git-svn-id: http://core.svn.wordpress.org/trunk@50665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 23:09:58 +00:00
Sergey Biryukov b964d532e2 Docs: Add a `@since` note to `wp_parse_id_list()` and `wp_parse_slug_list()` about using `wp_parse_list()`.
Follow-up to [44546], [49941].

Props joyously, dlh, pbiron.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@51055


git-svn-id: http://core.svn.wordpress.org/trunk@50664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 21:21:57 +00:00
Sergey Biryukov 21cf927961 Tests: Remove the `::append_to_selector()` method from `Tests_Theme_wpThemeJson`.
The method exists in the `WP_Theme_JSON` class and appears to be erroneously duplicated in the test class.

Add a unit test that was meant to be included instead, as per https://github.com/WordPress/gutenberg/pull/32190.

Follow-up to [51051].

See #52991.
Built from https://develop.svn.wordpress.org/trunk@51054


git-svn-id: http://core.svn.wordpress.org/trunk@50663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 11:31:57 +00:00
Sergey Biryukov 44c185e0cf Coding Standards: Simplify a condition in `wp-admin/admin-footer.php`.
Props jamil95, mukesh27.
Fixes #53306.
Built from https://develop.svn.wordpress.org/trunk@51053


git-svn-id: http://core.svn.wordpress.org/trunk@50662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 11:30:57 +00:00
youknowriad c1fa1f8b21 Block Editor: Update the Gutenberg branch used to launch Gutenberg e2e tests.
In core, you can run `tests/gutenberg/run.js` script to run the Gutenberg e2e tests
against Core with the plugin being disabled. This test ensures that the integration
of the block editor with Core is working properly.

This commit updates the Gutenberg base branch to be used for the tests to be wp/trunk
which corresponds to the latest packages that are included in Core.

See #52991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 09:22:58 +00:00
youknowriad e335b68afc Block Editor: Update packages and backport the latest Gutenberg fixes.
This includes the following fixes:

- Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279
- Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063
- Template mode:
    - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057
    - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026
    - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076
    - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315
    - Update the title area https://github.com/WordPress/gutenberg/pull/32037 
- Widgets Screen:
    - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757
    - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991
    - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212
    - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262
    - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260
    - 
- Block Widgets in the customizer: 
    - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140
    - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072
    - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175
    - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259
    - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005
    - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 
- Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006
- Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 
- Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070
- Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102
- Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152
- Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159
- Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160
- Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190
- Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200
- Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229
- Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245
- Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266
- Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305
- Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343
- Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135

Props nosolosw, noisysocks.
See #52991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 08:10:04 +00:00
Andrew Ozz 6acd4d4c16 Docs: Improve documentation for `get_option()`. Clean up, clarify the returned types and the exceptions, and add few examples.
Props ReneHermi, johnbillion, azaozz
See #51278

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


git-svn-id: http://core.svn.wordpress.org/trunk@50659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 00:00:58 +00:00
TimothyBlynJacobs f3504cd945 REST API: Remove duplicates in the widget types endpoint.
Props noisysocks, spacedmonkey, imath, isabel_brison.
Fixes #53305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-31 20:57:58 +00:00
Sergey Biryukov d2ef664134 Docs: Improve documentation for the `wp_resource_hints` filter.
Clarify that as of WordPress 4.7, the `$urls` parameter can accept arrays of specific HTML attributes as its child elements, in addition to URLs.

Follow-up to [37920], [38826].

Props vanyukov, Rahmohn, desrosj, peterwilsoncc, SergeyBiryukov.
Fixes #52842.
Built from https://develop.svn.wordpress.org/trunk@51048


git-svn-id: http://core.svn.wordpress.org/trunk@50657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-31 15:39:59 +00:00
Sergey Biryukov 5232f2be96 Coding Standards: Use strict comparison in `wp-includes/class-wp-customize-nav-menus.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@51047


git-svn-id: http://core.svn.wordpress.org/trunk@50656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-30 19:18:01 +00:00
Sergey Biryukov fedbeb2f3c Docs: Document that `has_block()` does not check reusable blocks.
Since the function only checks the raw, non-parsed post content, reusable blocks are just a `core/block` type and nothing more at that point.

In order to also check reusable blocks, the content needs to be parsed using `parse_blocks()` first.

Props vyskoczilova, peterwilsoncc.
Fixes #53140.
Built from https://develop.svn.wordpress.org/trunk@51046


git-svn-id: http://core.svn.wordpress.org/trunk@50655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-29 18:43:00 +00:00
ryelle 086edc3d12 Bundled Themes: Introduce block patterns for Twenty Fourteen.
Props beafialho, kjellr, melchoyce, onemaggie, poena, jffng, jeffikus.
Fixes #51103.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-28 18:17:59 +00:00
Sergey Biryukov 972d2bc117 Docs: Improve documentation for `wp_list_filter()` and `wp_filter_object_list()`.
This should make the purpose and behavior of these functions more obvious without reading the code.

Props ribaricplusplus.
Fixes #52808.
Built from https://develop.svn.wordpress.org/trunk@51044


git-svn-id: http://core.svn.wordpress.org/trunk@50653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-28 18:04:57 +00:00
ryelle 1cef3d1812 Bundled Themes: Introduce block patterns for Twenty Fifteen.
Props melchoyce, kjellr, onemaggie.
Fixes #51102.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-28 17:21:05 +00:00
Sergey Biryukov 1b68f58b6d Bundled Themes: Update the "Tested up to" value.
"Tested up to" is not displayed on the theme directory or within the WordPress dashboard, but should be updated to be accurate for anyone reading the theme's source code.

Props akabarikalpesh, francina, mukesh27.
Fixes #53276.
Built from https://develop.svn.wordpress.org/trunk@51042


git-svn-id: http://core.svn.wordpress.org/trunk@50651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 20:44:57 +00:00
desrosj 4a7c797d92 General: Correct the inline code examples for `_wp_array_get()` and `_wp_array_set().
Props thomasplevy, SergeyBiryukov.
Fixes #53264.
Built from https://develop.svn.wordpress.org/trunk@51041


git-svn-id: http://core.svn.wordpress.org/trunk@50650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 19:36:59 +00:00
desrosj 2abc73b4cd Build/Test Tools: Update the several dependencies.
This updates the following dependencies:

- `chalk` from `4.1.0` to `4.1.1`.
- `dotenv` from `8.2.0` to `10.0.0`.
- `grunt` from `1.4.0` to `1.4.1`.
- `sass` from `1.32.12` to `1.34.0`.
- `sinon` from `10.0.0` to `11.1.1`.
- `uglify-js` from `3.13.6` to `3.13.8`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@51040


git-svn-id: http://core.svn.wordpress.org/trunk@50649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 19:33:19 +00:00
Sergey Biryukov 7573bd8e8d Docs: Use a duplicate hook reference for `widgets_admin_page` in `wp-admin/widgets-form-blocks.php`.
Follow-up to [51038].

See #51506.
Built from https://develop.svn.wordpress.org/trunk@51039


git-svn-id: http://core.svn.wordpress.org/trunk@50648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 09:07:01 +00:00
noisysocks 341944a352 Widgets: Perform 'widgets_admin_page' action in block widget editor
Perform the 'widgets_admin_page' action just prior to outputting markup for the
widgets block editor so as to maximise backwards compatibility with the old
screen.

Follows [51037].
See #51506.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 01:52:57 +00:00
noisysocks 37bef4c2c5 Widgets: Remove unnecessary enqueue of 'format-library' assets
It is not necessary to enqueue 'format-library' assets here as this is done when
triggering the 'enqueue_block_editor_assets' action.

Follows [51028].
See #51506.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 01:50:57 +00:00
Peter Wilson abde9678b4 Build tools: Use hashed module IDs for minified files.
Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files.

Follow up to [50940].

Props gziolo, peterwilsoncc.
Fixes #53192.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 00:17:06 +00:00
ryelle 4995a09ba2 Twenty Thirteen: Fix missing translations in block patterns, add image credits.
Props audrasjb, melchoyce.
Follow-up to [51012].
Fixes #51104.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 16:55:57 +00:00
ryelle 3faec7852e Bundled Themes: Introduce block patterns for Twenty Twelve.
Props beafialho, kjellr, melchoyce, onemaggie.
Fixes #51105.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 16:39:58 +00:00
Sergey Biryukov a30afc155e General: Avoid a PHP warning when checking the `mbstring.func_overload` PHP value.
This avoids "A non-numeric value encountered" warning when `mbstring.func_overload` is set to something other than a numeric string, e.g. an empty string instead of the default `'0'` value.

Props djbu.
Fixes #53282.
Built from https://develop.svn.wordpress.org/trunk@51032


git-svn-id: http://core.svn.wordpress.org/trunk@50641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 16:05:59 +00:00
jorgefilipecosta 60d7dcdc61 Block Editor: Fix logic to enable custom colors, gradients, and font sizes.
The logic to enable or disabled colors, gradients, and font sizes missed a negative operator, so when things should be enabled they weren't and they should be disabled they were enabled. This commit fixes the logic.

Props ntsekouras.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@51031


git-svn-id: http://core.svn.wordpress.org/trunk@50640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 14:25:59 +00:00
Sergey Biryukov b1666e78fb Media: Replace `basename()` usage on media upload screen with `wp_basename()` for better multibyte filenames support.
Includes minor code layout fixes for better readability.

Follow-up to [44785], [51023].

See #51754.
Built from https://develop.svn.wordpress.org/trunk@51030


git-svn-id: http://core.svn.wordpress.org/trunk@50639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 14:24:57 +00:00
Peter Wilson bd192a0fbc REST API: Re-introduce `WP_Test_REST_Widgets_Controller` tests.
Returns the test suite with the addition of defining a URL in the RSS widget within `WP_Test_REST_Widgets_Controller::test_get_items()` to work around an infinite loop in `WP_Widget_RSS` on PHP 8 if the URL is unset or empty.

Reverts [51020].

Props peterwilsoncc, TimothyBlynJacobs.
See #41683.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 06:15:58 +00:00
Peter Wilson 1e5fccc2d2 Widgets: Ignore CSS files in legacy widgets block.
Add SVN ignore property to match existing rule in `.gitignore`.

Follow up to [50997].
See #51506.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 03:00:57 +00:00
Peter Wilson 885bdb2556 Posts, Post Types: Improve `post_exists()` query.
Add `$status` parameter to `post_exists()` to allow developers to specify a post type, date and status to ensure they hit the `wp_posts` table's `type_status_date` index when determining if a post exists.

Props apokalyptik, boonebgorges, brettshumaker, DrewAPicture, MikeHansenMe, peterwilsoncc, whyisjake.
Fixes #34012.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 02:17:56 +00:00
TimothyBlynJacobs cc26123e20 REST API: Add support for modifying the term relation when querying posts.
By default, a post most contain any of the requested terms to be included in the response. This commit adds a new `operator` property that can be set to `AND` to require a post to contain all of the requested terms.

For example, `/wp/v2/posts?tags[terms]=1,2,3&tags[operator]=AND` will return posts that have tags with the ids of 1, 2, and 3.

Props dlh, earnjam, Clorith, jnylen0, sebbb.
Fixes #41287.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 02:16:59 +00:00
ryelle 6e4b41c848 Site Health, Privacy: Combine shared CSS for Site Health & Privacy Settings
The styles for the Privacy settings page were based on the Site Health section. These were duplicated into `edit.css` in #49264. This change merges the selectors from Site Health into the Privacy section, to reduce that duplicate code.

Props xkon, notlaura, clorith.
See #52429.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:53:57 +00:00
desrosj 59b2dbb855 General: Pass the scheme to the `*_url` filters.
This adds an additional `$scheme` parameter to the following URL related filters:
- `admin_url`.
- `includes_url`.
- `network_admin_url`.
- `user_admin_url`.

Props johnbillion, SergeyBiryukov, desrosj.
Fixes #52813.
Built from https://develop.svn.wordpress.org/trunk@51024


git-svn-id: http://core.svn.wordpress.org/trunk@50633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:47:59 +00:00
antpb e2e8120fa6 Media: Add button in media upload page for copying the media url.
Adds a button to the media upload page to make copying the url possible on the same page when a media item upload is successful.

Props anotia, ryokuhi, Mista-Flo, lukecarbis, antpb, claytoncollie, shaunandrews, joedolson.
Fixes #51754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:40:58 +00:00
Sergey Biryukov d7086ba67a Themes: Display the number of available theme updates in the admin menu.
This brings some consistency with the similar update counter for plugins.

Props mukesh27, zodiac1978, pixolin, Boniu91, francina, sannevndrmeulen, joyously, SergeyBiryukov.
Fixes #43697.
Built from https://develop.svn.wordpress.org/trunk@51022


git-svn-id: http://core.svn.wordpress.org/trunk@50631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:17:57 +00:00
ryelle 56ca42b5d9 Block Editor: Add support for the pattern directory.
Add an endpoint for fetching block patterns from WordPress.org, and load the block patterns from this new API. Remove the block patterns that have already been moved to WordPress.org/patterns.

Props ryelle, iandunn, youknowriad, timothyblynjacobs.
Fixes #53246.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:11:59 +00:00
Peter Wilson 072e83aac4 REST API: Remove `WP_Test_REST_Widgets_Controller` tests.
This test suite is causing a loop in PHP8, remove tests to investigate.

Props SergeyBiryukov, desrosj.
See #41683.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 00:29:58 +00:00
desrosj f8947ceb0b Formatting: Introduce the `document_title` filter.
In `wp_get_document_title(), the returned value is currently passed directly through `wptexturize()`, `convert_chars()`, and `capital_P_dangit()`, and is done so after the `document_title_parts` filter is run.

This makes it impossible to fully control the output of `wp_get_document_title()` and is inconsistent with how other similar text is processed with these functions.

This commit introduces the `document_title` filter, which is run immediately before returning the results of the `wp_get_document_title()` function and moves the three formatting functions mentioned above to the new filter hook. This allows developers to further modify the title after being prepared by WordPress, or to modify the functions hooked to this filter as they wish.

Props dragunoff, jeremyfelt, paaggeli, audrasjb.
Fixes #51643.
Built from https://develop.svn.wordpress.org/trunk@51019


git-svn-id: http://core.svn.wordpress.org/trunk@50628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 23:43:57 +00:00
Sergey Biryukov 9c0dc03f90 Posts, Post Types: Speed cached `get_pages()` calls.
This improves performance for sites with persistent cache backend having a lot of pages requested via the `get_pages() function, by taking advantage of `wp_cache_get_multiple()` instead of fetching each individual page from the backend cache server one by one.

It also matches the behaviour of `get_pages()` when the pages are retrieved from the database.

Props david.binda, hellofromTonya.
Fixes #51469.
Built from https://develop.svn.wordpress.org/trunk@51018


git-svn-id: http://core.svn.wordpress.org/trunk@50627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 23:41:57 +00:00
desrosj 66603b4bd7 External Libraries: Update two polyfill libraries to their latest versions.
This updates the following polyfill libraries bundled with WordPress to their latest versions:
- `formdata-polyfill` from `3.0.20` to `4.0.0`.
- `polyfill-library` from `3.104.0` to `3.105.0`.

Fixes #52854.
Built from https://develop.svn.wordpress.org/trunk@51017


git-svn-id: http://core.svn.wordpress.org/trunk@50626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 23:28:15 +00:00
Sergey Biryukov 6da4818d8c Build/Test Tools: Use the Composer-installed version of PHPUnit for Grunt tasks.
This makes it easier to run `phpunit` Grunt tasks without having to figure out how and which PHPUnit version needs to be installed.

It also more closely matches the `format:php` task.

Follow-up to [47881].

Props ocean90.
Fixes #53015.
Built from https://develop.svn.wordpress.org/trunk@51016


git-svn-id: http://core.svn.wordpress.org/trunk@50625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 23:15:58 +00:00
Sergey Biryukov b8ee0a22a5 Posts, Post Types: Remove some unused strings from built-in post type declarations.
The `customize_changeset`, `wp_block`, and `wp_template` post types are not displayed in the admin menu or in the admin bar.

If they do get added, the labels can just fall back to `name` and `singular_name` until separate strings are required for more flexible translations.

Follow-up to [38810], [44146], [51003].

See #53176.
Built from https://develop.svn.wordpress.org/trunk@51015


git-svn-id: http://core.svn.wordpress.org/trunk@50624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 22:49:57 +00:00
Sergey Biryukov 74eec0c180 Block Editor: Declare the `wp_template` post type as built-in.
Remove redundant `show_in_admin_bar` property, which defaults to the value of `show_in_menu`.

Follow-up to [51003].

See #53176.
Built from https://develop.svn.wordpress.org/trunk@51014


git-svn-id: http://core.svn.wordpress.org/trunk@50623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 22:29:05 +00:00
Sergey Biryukov 3c3a18a957 Block Editor: Only load the `WP_Theme_JSON_Resolver` class once.
Since the class is now loaded via `wp-includes/script-loader.php`, which is required earlier in `wp-settings.php`, loading it again in `wp-settings.php` is redundant.

Follow-up to [50992], [51001].

See #53175.
Built from https://develop.svn.wordpress.org/trunk@51013


git-svn-id: http://core.svn.wordpress.org/trunk@50622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 21:40:57 +00:00
ryelle d8b8ceb4d3 Bundled Themes: Introduce block patterns for Twenty Thirteen.
Props joen, melchoyce, kjellr, onemaggie.
Fixes #51104.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 20:26:59 +00:00
Sergey Biryukov 8f8f433b3c Administration: Improve the message about installing the Link Manager plugin to use legacy Links screen.
This provides direct links to install and activate the plugin, if the user has the capabilities to do so, instead of just linking to plugin search results.

It also matches more closely the message about installing the Classic Editor plugin for meta boxes incompatible with the block editor.

Follow-up to [22855], [44280], [45657].

Props tw2113, peterwilsoncc, SergeyBiryukov.
Fixes #52669.
Built from https://develop.svn.wordpress.org/trunk@51011


git-svn-id: http://core.svn.wordpress.org/trunk@50620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 20:14:59 +00:00
Sergey Biryukov b722ba6ca5 Coding Standards: Further update the code for bulk menu items deletion to better follow WordPress coding standards.
Follow-up to [51006], [51009].

See #21603.
Built from https://develop.svn.wordpress.org/trunk@51010


git-svn-id: http://core.svn.wordpress.org/trunk@50619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 19:14:57 +00:00
joedolson a4bf256f7c Coding Standards: Apply some minor coding standards fixes.
Follow up to [51006].

See #21603.
Built from https://develop.svn.wordpress.org/trunk@51009


git-svn-id: http://core.svn.wordpress.org/trunk@50618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 18:53:58 +00:00
desrosj e6ea717277 External Libraries: Update the phpass library to version `0.5`.
This updates the phpass library from version `0.3` to the latest version of `0.5`. This is a minor update that includes some adjustments to be more friendly with newer versions of PHP.

The changes made in [30466] have also been applied to the new version of the library. This should now be the only WordPress specific modification do this library.

Props ayeshrajans, dd32, otto42, desrosj.
Fixes #51549.
Built from https://develop.svn.wordpress.org/trunk@51008


git-svn-id: http://core.svn.wordpress.org/trunk@50617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 18:47:59 +00:00
desrosj 836b5ad7c7 Coding Standards: Apply some minor coding standards adjustments.
Follow up to [50977], [50987], and [50995].

See #41683, #53156, #53175.
Built from https://develop.svn.wordpress.org/trunk@51007


git-svn-id: http://core.svn.wordpress.org/trunk@50616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:43:57 +00:00
joedolson 212f532d4c Menus: Add bulk delete for menu items.
Adds an option to bulk delete menu items from the core Navigation Menus screen, offering a considerable usability benefit when making significant changes to navigation menus.

Uses the bulk select pattern found in post and media lists for consistency with other core management screens, rather than the rapid delete pattern found in menus in the customizer.

Props wphound, welcher, melchoyce, maxpertici, audrasjb
Fixes #21603.
Built from https://develop.svn.wordpress.org/trunk@51006


git-svn-id: http://core.svn.wordpress.org/trunk@50615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:42:58 +00:00
desrosj a07a6490ab Users: Pass on the user data received by `wp_insert_user()` to related hooks.
This adds a new parameter to the action and filter hooks found in `wp_insert_user()` to pass the raw user data received through `$userdata` to hooked functions.

This will allow hooked functions to perform more contextual adjustments to new users, and makes supplying custom user meta fields possible.

Props johnbillion, audrasjb.
Fixes #53110.
Built from https://develop.svn.wordpress.org/trunk@51005


git-svn-id: http://core.svn.wordpress.org/trunk@50614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:39:57 +00:00
ryelle b797aa3b53 Toolbar: Prevent username from wrapping when avatars are disabled.
In IE11, the floated icon causes the "Howdy, username" to wrap to a second line, preventing access to help tabs and possibly affecting the frontend. Changing the display fixes the layout, and prevents the wrap.

Props bhwebworks, 5um17, sabernhardt, boniu91, audrasjb.
Fixes #26933.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:10:58 +00:00
youknowriad 4ae0e4220f Block Editor: Introduce block templates for classic themes.
With this patch, users will be able to create custom block based templates
and assign them to specific pages/posts.

Themes can also opt-out of this feature

Props bernhard-reiter, carlomanf.
Fixes #53176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 14:20:57 +00:00
Sergey Biryukov 30d411f482 Upgrade/Install: Update sodium_compat to v1.16.1.
The latest version of sodium_compat includes polyfills for new features slated to land in PHP 8.1:
https://paragonie.com/blog/2021/05/ristretto255-for-php-community

It also fixes a race condition with the autoloader that caused an "undefined constant" error on some systems:
https://github.com/paragonie/sodium_compat/issues/122

A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.14.0...v1.16.1

Follow-up to [49741].

Props paragoninitiativeenterprises, oxyrealm.
Fixes #53274.
Built from https://develop.svn.wordpress.org/trunk@51002


git-svn-id: http://core.svn.wordpress.org/trunk@50611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 13:55:58 +00:00
youknowriad f6af848c72 Block Editor: Load theme resolver class in script loader.
script-loader.php is sometimes called directly and in these situations, the Theme_JSON_Resolver class was not defined.

Props nosolosw, noisysocks.
Fixes #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 13:42:58 +00:00
Sergey Biryukov cc95428f75 REST API: Update “object” strings to use the appropriate nouns.
This updates route arguments and schema descriptions to use more specific object types for clarity.

Follow-up to [39342].

Props lephleg, jnylen0.
Fixes #40720.
Built from https://develop.svn.wordpress.org/trunk@51000


git-svn-id: http://core.svn.wordpress.org/trunk@50609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 13:12:58 +00:00
Sergey Biryukov 670ec9cfa7 Comments: Include a "View Post" link on the Comments screen for a single post.
This makes it easier to view the post on the front end of the site when moderating comments, without having to open the editor first.

Props trejder, audrasjb, vladytimy, lukecarbis, ayeshrajans, chaion07, paaljoachim, hareesh-pillai, SergeyBiryukov.
Fixes #52353.
Built from https://develop.svn.wordpress.org/trunk@50999


git-svn-id: http://core.svn.wordpress.org/trunk@50608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 12:26:58 +00:00
Sergey Biryukov c649d69a9a Coding Standards: Move assignment out of condition in `phpunit/includes/speed-trap-listener.php`.
Follow-up to [45588] for `phpunit/includes/phpunit7/speed-trap-listener.php`.

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50998


git-svn-id: http://core.svn.wordpress.org/trunk@50607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 11:55:59 +00:00
noisysocks 8775b69cd0 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Follows [50996] which was missing these files.
See #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:52:58 +00:00
noisysocks 81f62198c3 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Fixes #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:40:25 +00:00
noisysocks 1314542c50 REST API: Add widget endpoints
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.

Fixes #41683.
Props TimothyBlynJacobs, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:27:57 +00:00
noisysocks ed195fbd89 REST API: Revert widget endpoints
Reverts [50993] as it has missing props.

Reverts [50993].
See #41683.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:22:56 +00:00
noisysocks 2a4e1e0c04 REST API: Add widget endpoints
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.

Fixes #41683.
Props TimothyBlynJacobs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 07:52:55 +00:00
youknowriad 2b7ad8ad4f Block Editor: Load the classic layout stylesheet conditionallty.
Historically, the block editor has been opinionated about the size of the canvas and the alignments.
Themes with theme.json will have to define a "layout" in their settings and the classic stylesheet won't be loaded anymore for this.

Props nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 07:40:56 +00:00
youknowriad dd68caaf6d Block Editor: Add the layout block support.
The layout block allows containers to define the size of their inner blocks
and the allowed allignments.
It's only enabled for themes with theme.json files.

Props nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 07:36:58 +00:00
Aaron Jorbin b6b98b8e2d Formatting: Add 'main' tag to kses
`main` is a valid HTML element that is especially valuable for KSES to support in light of full site editing.

Related: https://github.com/WordPress/gutenberg/pull/28576 for the addition of `main` to the group block.

Fixes #53156.
Props glendaviesnz.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 01:43:55 +00:00
Sergey Biryukov 5386157101 Tests: Minimize the chances of signature conflicts for `assertEqualsWithDelta()`.
The PHPUnit 7.5+ method `assertEqualsWithDelta()` was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.

This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the `IsEqual()` class alias declaration, no longer needed.

Follow-up to [48952].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 01:09:00 +00:00
Peter Wilson 277e288c44 Build: Use deterministic module ids in webpack for media.
Used `hashed` IDs rather the `named` IDs to reduce file size and remove references to non-existent paths in the final build.

Follow-up for [50940,50984].
Props gziolo, peterwilsoncc.
See #53192.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 00:12:57 +00:00
gziolo 2597902bc0 Build: Use deterministic module ids in webpack for media
Follow-up for [50940].
Props peterwilsoncc.
See #53192. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@50593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 21:35:56 +00:00
gziolo cfa7f89ba0 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 21:21:57 +00:00
Sergey Biryukov 492bfa670e Tests: Improve PHPUnit version retrieval.
Always test for newer class names first and fall back to the older.

This improves compatibility when running PHPUnit via a phar while there is also a Composer-installed version of PHPUnit on the system.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 21:04:56 +00:00
desrosj 0d1e4e553c General: Avoid unnecessary calls to `update_user_option()`.
The `update_user_option()` function is a way to update a user meta value after adding a blog’s prefix to the beginning of the meta key. But when the fourth parameter is `true`, the behavior is exactly the same as calling `update_user_meta()` directly.

This replaces all instances of `update_user_option()` when the fourth parameter is `true` in Core with a direct call to `update_user_meta()` to prevent an unnecessary call to `update_user_option()`.

Props johnjamesjacoby, zkancs, obenland, desrosj.
Fixes #43339.
Built from https://develop.svn.wordpress.org/trunk@50981


git-svn-id: http://core.svn.wordpress.org/trunk@50590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:59:57 +00:00
desrosj 50c526f82b Editor: Hide the quicktags toolbar when JavaScript is disabled.
This adds the `hide-if-no-js` class to the quicktags toolbar in the Classic Editor. This prevents an empty space from showing when JavaScript is disabled.

Props DeusTron, sabernhardt, Boniu91, poena.
Fixes #40570.
Built from https://develop.svn.wordpress.org/trunk@50980


git-svn-id: http://core.svn.wordpress.org/trunk@50589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:44:57 +00:00
Sergey Biryukov c4182fd00f Site Health: Make sure the `submit_button()` function is available in `request_filesystem_credentials()`.
This avoids a fatal error when the function is called via REST API from `WP_Site_Health_Auto_Updates::test_check_wp_filesystem_method()`.

Props lakrisgubben, mukesh27, Clorith, SergeyBiryukov.
Fixes #53206.
Built from https://develop.svn.wordpress.org/trunk@50979


git-svn-id: http://core.svn.wordpress.org/trunk@50588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:24:57 +00:00
Sergey Biryukov 209074f5e1 Themes: Add an indication of whether a theme is a child theme on network admin Themes screen.
This shows the parent theme name in a child theme's metadata section in the list table, in a similar way it is displayed in the theme details modal on the single site Themes screen.

Props dpik, Mista-Flo, seanchayes, poena, johnbillion, jeremyfelt, bradt, jacklenox, helen, Travel_girl, karmatosed, Presskopp, joyously, SergeyBiryukov.
Fixes #30240.
Built from https://develop.svn.wordpress.org/trunk@50978


git-svn-id: http://core.svn.wordpress.org/trunk@50587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:04:56 +00:00
jorgefilipecosta 9b67649f40 Block Editor: Update color merging algorithm.
The npm packages in use were published a few hours ago, which include some changes to how we manage colors. This commit adds the corresponding PHP changes.

Props nosolosw.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@50977


git-svn-id: http://core.svn.wordpress.org/trunk@50586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 18:57:55 +00:00
desrosj 0a75462702 Twenty Twenty: Hide some elements for print that are not useful in that context.
This adds the comment count, previous/next posts navigation, and category link list to the list of elements hidden from the print context.

Props kjellr, hareesh-pillai, poena.
Fixes #50433.
Built from https://develop.svn.wordpress.org/trunk@50976


git-svn-id: http://core.svn.wordpress.org/trunk@50585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 18:41:55 +00:00
desrosj 5132f704d4 Twenty Twenty-One: Re-add `px` unit to the admin bar height custom property.
The `px` unit added in [50388] to prevent invalid values when using `calc` functions was inadvertently removed in [50972].

This re-adds the unit to ensure the issue reported in #52564 remains fixed. The same stylelint rule adjustment made in [50388] to `.stylelintrc-css.json` has also been copied over to `stylelintrc.json` file,  which is the configuration file used when linting `.scss` files.

Props ocean90.
See #52624, #52564.
Built from https://develop.svn.wordpress.org/trunk@50975


git-svn-id: http://core.svn.wordpress.org/trunk@50584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 18:33:59 +00:00
desrosj cb5943f263 Bundled Themes: Update `devDependencies` for default themes.
This updates several `devDependencies` to their latest versions for the Twenty Twenty and Twenty Nineteen themes.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50974


git-svn-id: http://core.svn.wordpress.org/trunk@50583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 18:10:00 +00:00
jorgefilipecosta 18200cc30c Block Editor: Add Global Styles support using theme.json file.
This is the second piece of landing the theme.json processing in WordPress core. 
It includes the mechanism that outputs the CSS styles of a theme.json file.

Props nosolosw, youknowriad.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@50973


git-svn-id: http://core.svn.wordpress.org/trunk@50582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 17:39:57 +00:00
desrosj a537de7b00 Twenty Twenty-One: Update `devDependencies`.
This updates several `devDependencies` to their latest versions.

The deprecated `stylelint-config-wordpress` package has also been replaced with the `@wordpress/stylelint-config` package.

This commit also includes several minor adjustments to `.scss` files to decrease the number of coding standards warnings produced when running `lint:scss`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50972


git-svn-id: http://core.svn.wordpress.org/trunk@50581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 15:37:55 +00:00
Sergey Biryukov f092c961c0 Editor: Remove `gutenberg` text domain from Query and Social Links block patterns.
Follow-up to [50948].

Props ntsekouras.
Fixes #53265. See #53248.
Built from https://develop.svn.wordpress.org/trunk@50971


git-svn-id: http://core.svn.wordpress.org/trunk@50580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:53:56 +00:00
Sergey Biryukov bd5322c635 Tests: Remove trailing commas in function calls in `_wp_array_get()` tests.
This fixes parse errors on PHP 7.2 and lower versions.

Follow-up to [49143], [49144], [49580], [50964].

See #51461, #51720, #52625.
Built from https://develop.svn.wordpress.org/trunk@50970


git-svn-id: http://core.svn.wordpress.org/trunk@50579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:47:56 +00:00
Sergey Biryukov 09177b1965 Tests: Rename classes in `phpunit/tests/privacy/` per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50969


git-svn-id: http://core.svn.wordpress.org/trunk@50578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:38:58 +00:00
Sergey Biryukov f6114ba4b4 Tests: Rename some classes in `phpunit/tests/theme/` per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50968


git-svn-id: http://core.svn.wordpress.org/trunk@50577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:32:56 +00:00
Sergey Biryukov 19ea4bd412 Docs: Some documentation and test improvements for `WP_Theme_JSON` and `WP_Theme_JSON_Resolver` classes:
* Add missing `@since` tags.
* Update some DocBlocks per the documentation standards.
* Rename test files and classes per the naming conventions.
* Fix some code alignment issues reported by WPCS.

Follow-up to [50959], [50960].

See #52991, #53175.
Built from https://develop.svn.wordpress.org/trunk@50967


git-svn-id: http://core.svn.wordpress.org/trunk@50576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:25:56 +00:00
Sergey Biryukov 645fffca13 Tests: Correct description for the `Tests_Functions_wpArraySet` class.
Follow-up to [50958], [50962], [50964], [50965].

See #53175, #52625.
Built from https://develop.svn.wordpress.org/trunk@50966


git-svn-id: http://core.svn.wordpress.org/trunk@50575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 12:28:54 +00:00
Sergey Biryukov 8f47c944d8 General: Some documentation and test improvements for the `_wp_array_set()`:
* Update the function DocBlock per the documentation standards.
* Move the unit tests to a more appropriate place.
* Rename and reorder the tests for consistency with `_wp_array_get()` tests.

Follow-up to [50958], [50962], [50964].

See #53175, #52625.
Built from https://develop.svn.wordpress.org/trunk@50965


git-svn-id: http://core.svn.wordpress.org/trunk@50574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 12:25:55 +00:00
Sergey Biryukov 935ab6ecca Tests: Add missing tests for the `_wp_array_get()` function.
Follow-up to [49143], [49144], [49580].

Props jorgefilipecosta, johnbillion.
See #51461, #51720, #52625.
Built from https://develop.svn.wordpress.org/trunk@50964


git-svn-id: http://core.svn.wordpress.org/trunk@50573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 11:07:55 +00:00
gziolo a380cdd21a Editor: Remove unused param in `get_default_block_editor_settings`
Follow-up for [50776].

Props nosolosw.
See #52920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 10:23:56 +00:00
gziolo 75f4e848f5 Editor: Rename the unit test file for `_wp_array_set` function
Follow-up [50958].
See #53175. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@50571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:59:56 +00:00
Sergey Biryukov aabce962ae Widgets: Make sure `WP_Widget` constructor creates a correct `classname` value for a namespaced widget class.
This reverts the changes to `id_base` from [50953] due to backward compatibility concerns, and instead focuses on the `id` and `class` attributes specifically.

With this change, any backslashes in the `id` or `class` attributes for a namespaced widget class are converted to underscores, making it easier to style the output or target the widget with JavaScript.

Follow-up to [50953].

Fixes #44098.
Built from https://develop.svn.wordpress.org/trunk@50961


git-svn-id: http://core.svn.wordpress.org/trunk@50570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:51:56 +00:00
gziolo 3143af5910 Editor: Fix failing unit test for i18n support in `theme.json`
As part of the change, I also did some code reorganization to match with how other test fixtures are handled.

Follow-up [50959].

See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:50:59 +00:00
youknowriad 4e1dc7a28c Block Editor: Add Global Settings support using theme.json file.
This is the first piece of landing the theme.json processing in WordPress core. 
It allows themes to configure the different editor settings, allow cusomizations and define presets in theme.json file.
 
Props jorgefilipecosta, nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:37:55 +00:00
youknowriad 6c0578055c General: Add _wp_array_set function.
This adds the _wp_array_set function, which is the counterpart of the existing _wp_array_get.
This utility is to be used by the Global Settings work.

Props nosolosw, jorgefilipecosta.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:30:56 +00:00
gziolo 3989828e0b Editor: Add missing class WP_Block_Editor_Context
Follow-up for [50956].
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:38:58 +00:00
gziolo 4ae98860b9 Editor: Extract `block_editor_rest_api_preload` method for use with different editor screens
It is going to be used on the new widgets editor screen. This patch also introduced a new class WP_Block_Editor_Context that is going to be used with revised block editor filters to let extenders to keep their existing behavior. It should also allow to provide more settings through the context class as new screens get introduced like the navigation editor.

Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:32:55 +00:00
gziolo f8286bbd4d Editor: Add missing unit tests for `block_has_support`
Follow-up for [50761].
Props ntsekouras.
Fixes #53257. See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 06:26:58 +00:00
Peter Wilson 5ce6da1a31 XML-RPC: Set HTTP status code in accordance with the spec.
When the XML-RPC endpoint is enabled, always return a HTTP `200 OK` status code in accordance with the XML-RPC specification. Continue to return an HTTP `405 Method Not Allowed` status code when the endpoint is disabled.

Props ariskataoka, johnbillion.
Fixes #52958.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 02:18:58 +00:00
Sergey Biryukov 7670b7dca8 Widgets: Make sure `WP_Widget` constructor creates a correct `id_base` value for a namespaced widget class.
The `id_base` value is used for the widget's `id` and `class` attributes and also for the option name which stores the widget settings (unless the widget specifies a custom `option_name` value).

With this change, any backslashes in the `id_base` for a namespaced widget class are converted to hyphens, making it easier to style the output or target the widget with JavaScript.

This also avoids a `preg_match(): Compilation failed` PHP warning from `next_widget_id_number()` on the Widgets screen, previously caused by unescaped backslashes.

Props Mte90, hermpheus, rogerlos, welcher, SergeyBiryukov.
Fixes #44098.
Built from https://develop.svn.wordpress.org/trunk@50953


git-svn-id: http://core.svn.wordpress.org/trunk@50562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-23 08:51:58 +00:00
Sergey Biryukov 1e02e0f049 Docs: Use 3-digit, x.x.x-style semantic versioning for two `_doing_it_wrong()` calls.
Follow-up to [37985], [38420], [39021].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@50952


git-svn-id: http://core.svn.wordpress.org/trunk@50561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-22 13:09:56 +00:00
Sergey Biryukov 5ffa346fd0 Media: Some documentation and test improvements for the `image_editor_output_format` filter:
* Update the filter DocBlock per the documentation standards.
* Use a shorter variable name for consistency with the surrounding code.
* Delete the test file before performing assertions to avoid leftovers in case the test fails.

Follow-up to [50943].

See #52867.
Built from https://develop.svn.wordpress.org/trunk@50951


git-svn-id: http://core.svn.wordpress.org/trunk@50560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-22 13:00:02 +00:00
youknowriad e0d91e047b Block Editor: Removed useless block editor render context value.
The "query" context value was meant to be used by the Query block.
But the block has been refactored to avoid relying on context for this.

Props ntsekouras.
Fixes #53250.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 15:57:56 +00:00
Adam Silverstein 5ddc1fb946 Revisions: add a new filter for revisions to keep by post type.
Add a new `wp_{$post_type}_revisions_to_keep` filter that makes it convenient to filter the number of revisions created for a specific post type.

Overrides both the value of WP_POST_REVISIONS and the `wp_revisions_to_keep` filter.

Props dlh.
Fixes #51550.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 15:29:55 +00:00
youknowriad b2e311b85d Block Patterns: Include the Query and Social Icons block patterns from Gutenberg 10.7.0.
These block patterns are considered "core" block patterns and removed
when a them opts out of the core-block-patterns theme support flag.

Props ntsekouras.
Fixes #53248.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 11:13:57 +00:00
Sergey Biryukov 977e81b1a1 Text Changes: Improve the wording of some error messages.
Props dartiss, williampatton, johnbillion, SergeyBiryukov.
Fixes #50382.
Built from https://develop.svn.wordpress.org/trunk@50947


git-svn-id: http://core.svn.wordpress.org/trunk@50556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:49:57 +00:00
Sergey Biryukov cbcd3ffef3 Boostrap/Load: Further update the language in `wp-config-sample.php`.
This restores "That's all, stop editing!" line to its previous format, to avoid breaking external integrations looking for that format specifically.

Follow up to [50915], [50917], [50918].

Props swissspidy, schlessera.
Fixes #37199.
Built from https://develop.svn.wordpress.org/trunk@50946


git-svn-id: http://core.svn.wordpress.org/trunk@50555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:40:56 +00:00
youknowriad a225c5cdc6 Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC.
This also includes:

 - The removal of the Post Author block.
 - Renaming build_query_vars_from_query_block function.
 - Update the block supports.

Props gziolo.
See #52991. 
-This line, and those below, will be ignored--

M    package-lock.json
M    package.json
M    src/wp-includes/assets/script-loader-packages.php
M    src/wp-includes/block-supports/colors.php
AM   src/wp-includes/block-supports/elements.php
D    src/wp-includes/block-supports/padding.php
AM   src/wp-includes/block-supports/spacing.php
M    src/wp-includes/block-supports/typography.php
M    src/wp-includes/blocks/column/block.json
M    src/wp-includes/blocks/index.php
D    src/wp-includes/blocks/post-author
D    src/wp-includes/blocks/post-author.php
M    src/wp-includes/blocks/post-content.php
M    src/wp-includes/blocks/post-featured-image.php
M    src/wp-includes/blocks/query/block.json
M    src/wp-includes/blocks/query-loop/block.json
M    src/wp-includes/blocks/query-loop.php
M    src/wp-includes/blocks/query-pagination/block.json
M    src/wp-includes/blocks/query-pagination-next.php
M    src/wp-includes/blocks/query-pagination-numbers.php
M    src/wp-includes/blocks/site-tagline/block.json
M    src/wp-includes/blocks/site-title/block.json
M    src/wp-includes/blocks.php
M    src/wp-settings.php
M    tests/phpunit/tests/blocks/block.php
M    tools/webpack/packages.js

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


git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:14:23 +00:00
gziolo 40eb9c9f9c Editor: Add missing unit tests for `construct_wp_query_args`
Follow-up for [50929].
Props ntsekouras, jorbin.
Fixes #53240. See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 06:29:57 +00:00
antpb 8284a1f6ae Media: Introduces `image_editor_output_format` filter for setting default MIME type of sub size image output.
This change introduces the `image_editor_output_format` filter, which fires as sub size images are generated allowing to define a default image MIME type for those items.

Props adamsilverstein, williampatton, spacedmonkey, mikeschroder, hellofromTonya, justinahinon, Boniu91, antpb, SergeyBiryukov.
Fixes #52867.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 22:15:56 +00:00
ryelle 48660b62b6 Administration: List Tables: Wrap long search terms onto a new line.
Props sumitsingh, audrasjb, justinahinon, sahilmepani, hareesh-pillai.
Fixes #52749.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 19:09:59 +00:00
gziolo c7acbeda19 Editor: Update `lodash` to the latest version 4.17.21
It aligns with the version that Gutenberg uses.

Props peterwilsoncc.
See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 13:02:17 +00:00
gziolo 6e4458c935 Build: Use hashed/deterministic moduleIDs in webpack config
Props peterwilsoncc, desrosj.
Fixes #53192.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 12:20:04 +00:00
Clorith c47c99900c Site Health: Skip REST tests during scheduled events.
This change fixes a false positive that would appear during scheduled events, by only running the REST test when a user visits the Site Health page, meaning an active session is available.

The test checking if the REST API is available, includes a parameter for `context=edit` to make sure the block editor can function properly. This means a user session with editor capabilities is required for the test to pass, which is not the case during a scheduled event.

Props szaqal21, TimothyBlynJacobs, hermpheus.
Fixes #52112.
Built from https://develop.svn.wordpress.org/trunk@50939


git-svn-id: http://core.svn.wordpress.org/trunk@50548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 11:09:56 +00:00
Peter Wilson fabf5334a5 Menus: Do not auto-set locations for new menus.
Do not auto-set new menus to all vacant locations on the Appearance > Menus screen in the dashboard.

Follow up to [48051].

Props Chouby, audrasjb, davidbaumwald, mukesh27.
Fixes #52949.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 04:52:56 +00:00
Sergey Biryukov cf90ff2427 General: Ensure consistent type for integer properties of a bookmark object.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following function:

* `sanitize_bookmark_field()`

and the following properties:

* `$bookmark::link_id`
* `$bookmark::link_rating`

Follow-up to [50935].

See #53235.
Built from https://develop.svn.wordpress.org/trunk@50936


git-svn-id: http://core.svn.wordpress.org/trunk@50545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 00:04:56 +00:00
Sergey Biryukov 893beee31e General: Ensure consistent type for integer properties of `WP_Post`, `WP_Term`, and `WP_User`.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following functions:

* `sanitize_post_field()`
* `sanitize_term_field()`
* `sanitize_user_field()`

and the following properties:

* `WP_Post::ID`
* `WP_Post::post_parent`
* `WP_Post::menu_order`
* `WP_Term::term_id`
* `WP_Term::term_taxonomy_id`
* `WP_Term::parent`
* `WP_Term::count`
* `WP_Term::term_group`
* `WP_User::ID`

Props grantmkin, SergeyBiryukov.
Fixes #53235. See #52995.
Built from https://develop.svn.wordpress.org/trunk@50935


git-svn-id: http://core.svn.wordpress.org/trunk@50544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 22:11:56 +00:00
desrosj 4a20a75fa1 Script Loader: Stop loading polyfills specific to Internet Explorer
This change removes the inline JavaScript attached to the `wp-polyfill` script responsible for loading polyfill libraries included specifically for Internet Explorer support.

Support for the final version of IE supported in WordPress Core (IE11) was removed in [50784] and will on longer be supported when the next version of WordPress is released.

These scripts are still registered and available to be enqueued, but WordPress will no longer load them by default.

For more information, see https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/.

Props youknowriad, gziolo, sergiomdgomes, desrosj.
Fixes #53078.
Built from https://develop.svn.wordpress.org/trunk@50934


git-svn-id: http://core.svn.wordpress.org/trunk@50543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 20:00:57 +00:00
davidbaumwald 77cf4ea88d Twenty Twenty: Correct `label` attribute references to `aria_label` in `get_search_form`.
In the bundled Twenty Twenty theme, a `label` argument was passed to `get_search_form` but used as the `aria_label` on the form.  This change updates the argument name to `aria_label` and maintains backwards compatibility for usage of the original `label` argument.

Props poena, sabernhardt, ipulc2, kishanjasani, mukesh27.
Fixes #51877.
Built from https://develop.svn.wordpress.org/trunk@50933


git-svn-id: http://core.svn.wordpress.org/trunk@50542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:39:56 +00:00
Sergey Biryukov 96beaa51d3 App Passwords: Use "sites" terminology instead of "blogs" in application passwords help text.
Follow-up to [49270].

Props jeremy80, johnbillion, audrasjb.
Fixes #53225.
Built from https://develop.svn.wordpress.org/trunk@50932


git-svn-id: http://core.svn.wordpress.org/trunk@50541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:17:56 +00:00
davidbaumwald f47a74a428 I18N: Combine escaping and translation functions.
There are a few instances where two separate functions are used for both escaping and translating output.  This change combines the two functions into the appropriate Core helper function.

Props dimadin, SergeyBiryukov.
Fixes #53153.
Built from https://develop.svn.wordpress.org/trunk@50931


git-svn-id: http://core.svn.wordpress.org/trunk@50540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:10:59 +00:00
desrosj 77c434e130 Build/Test Tools: Use the new `concurrency` setting for GitHub Actions.
The new `concurrency` setting can be used to ensure only a single workflow run or job is in progress. When used in combination with the `cancel-in-progress` setting, incomplete workflow runs can be cancelled automatically to prevent running workflows unnecessarily.

The workflows that take longer to run previously had this built into a step and utilized a 3rd-party action. Now that this is natively supported by GitHub Actions, using that is preferred.

This option is currently in beta, but is stable enough to use in our workflows for the time being.

Props ocean90.
Fixes #53080.
Built from https://develop.svn.wordpress.org/trunk@50930


git-svn-id: http://core.svn.wordpress.org/trunk@50539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 17:37:59 +00:00
gziolo c3ea09ebb8 Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 15:09:27 +00:00
gziolo 087934feea Docs: Include `@since` in `register_block_type` definition
See #53233.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 14:00:01 +00:00
gziolo 2ca2feff15 Editor: Extend `register_block_type` to accept the path file or folder with `block.json`
Rather than using two distinct methods to register block types in WordPress core, let's make `register_block_type` the canonical method to deal with all use cases. In practice, the patch proposed extends its usage to work as a proxy to `register_block_type_from_metadata`. It should remove some confusion that we observed and let us be more explicit what's the latest recommendation.

Props matveb, mcsf.
Fixes #53233.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 13:52:00 +00:00
Sergey Biryukov 2b6cc00455 Tests: Use `assertInstanceOf()` instead of `assertTrue()` in some tests.
See #52625.
Built from https://develop.svn.wordpress.org/trunk@50926


git-svn-id: http://core.svn.wordpress.org/trunk@50535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 21:06:02 +00:00
Sergey Biryukov f4631a98f5 Twenty Nineteen: Update theme information in the `package.json` file.
This removes references to the archived Git repository and updates the URLs to point to the theme's WordPress.org Theme Directory URL and Trac.

Follow-up to [50924].

See #53196.
Built from https://develop.svn.wordpress.org/trunk@50925


git-svn-id: http://core.svn.wordpress.org/trunk@50534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 12:49:01 +00:00
Sergey Biryukov 5343283f66 Twenty Twenty: Update theme information in the `package.json` file.
This removes references to the archived Git repository and updates the URLs to point to the theme's WordPress.org Theme Directory URL and Trac.

Props arkrs, desrosj, mukesh27.
Fixes #53196.
Built from https://develop.svn.wordpress.org/trunk@50924


git-svn-id: http://core.svn.wordpress.org/trunk@50533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 12:47:05 +00:00
Sergey Biryukov b8487747b8 KSES: Allow `calc()` and `var()` values to be used in inline CSS.
Props aristath, displaynone, joyously, olafklejnstrupjensen, sabernhardt, jamesbonham, poena.
Fixes #46197, #46498.
Built from https://develop.svn.wordpress.org/trunk@50923


git-svn-id: http://core.svn.wordpress.org/trunk@50532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 21:04:59 +00:00
Sergey Biryukov ac943f171a KSES: Remove duplicate `object-position` property.
As part of some recent changes, the property was added to the list of safe CSS properties twice.

Follow-up to [50634], [50761].

See #52991.
Built from https://develop.svn.wordpress.org/trunk@50922


git-svn-id: http://core.svn.wordpress.org/trunk@50531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 20:48:01 +00:00
Sergey Biryukov 9fbc705dc0 Plugins: Add support for `Update URI` header.
This allows third-party plugins to avoid accidentally being overwritten with an update of a plugin of a similar name from the WordPress.org Plugin Directory.

Additionally, introduce the `update_plugins_{$hostname}` filter, which third-party plugins can use to offer updates for a given hostname.

If set, the `Update URI` header field should be a URI and have a unique hostname.

Some examples include:

* `https://wordpress.org/plugins/example-plugin/`
* `https://example.com/my-plugin/`
* `my-custom-plugin-name`

`Update URI: false` also works, and unless there is code handling the `false` hostname, the plugin will never get an update notification.

If the header is present, the WordPress.org API will currently only return updates for the plugin if it matches the following format:

* `https://wordpress.org/plugins/{$slug}/`
* `w.org/plugin/{$slug}`

If the header has any other value, the API will not return a result and will ignore the plugin for update purposes.

Props dd32, DavidAnderson, meloniq, markjaquith, DrewAPicture, mweichert, design_dolphin, filosofo, sean212, nhuja, JeroenReumkens, infolu, dingdang, joyously, earnjam, williampatton, grapplerulrich, markparnell, apedog, afragen, miqrogroove, rmccue, crazycoders, jdgrimes, damonganto, joostdevalk, jorbin, georgestephanis, khromov, GeekStreetWP, jb510, Rarst, juliobox, Ipstenu, mikejolley, Otto42, gMagicScott, TJNowell, GaryJ, knutsp, mordauk, nvartolomei, aspexi, chriscct7, benoitchantre, ryno267, lev0, gregorlove, dougwollison, SergeyBiryukov.
See #14179, #23318, #32101.
Built from https://develop.svn.wordpress.org/trunk@50921


git-svn-id: http://core.svn.wordpress.org/trunk@50530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 17:04:01 +00:00
gziolo ff46fda58d Editor: Remove editor type specific filters for block editor configuration
Aligns with changes introduced in the Gutenberg plugin. The planned follow-up replace the editor name string with a context object to bring back an optional reference to the actual post.

Props youknowriad.
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 15:08:00 +00:00
gziolo b6ba5d33bc Editor: Rename `should_load_separate_core_block_assets` for consistency
Changes introduced:
- The `wp_should_load_separate_core_block_assets` function.
- The `should_load_separate_core_block_assets` filter.

Props hellofromTonya, SergeyBiryukov.
Fixes #50328.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 14:28:04 +00:00
Sergey Biryukov 51fe01e66d Docs: Update documentation in `wp-config-sample.php` per the documentation standards.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50918


git-svn-id: http://core.svn.wordpress.org/trunk@50527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-16 08:45:03 +00:00
Aaron Jorbin 5a0c9a9801 Boostrap/Load: Have language in wp-config-sample.php better match install instructions.
Help prevent errors from users who are less familiar with php from adding code in side the comment block and thus having their code not work. Therefore, this comment is now a single line.

Follow up to [50915].

Fixes #37199.
Props SergeyBiryukov.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-15 22:00:01 +00:00
Sergey Biryukov 63ea8284a3 Docs: Miscellaneous DocBlock corrections.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50916


git-svn-id: http://core.svn.wordpress.org/trunk@50525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-15 17:38:05 +00:00
Aaron Jorbin bf11362dab Boostrap/Load: Strengthen language in wp-config-sample.php
Make it clearer where custom pieces belong in wp-config.php

Props kraftbj, jorbin.
Fixes #37199.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-14 19:35:00 +00:00
Aaron Jorbin e37057bd6b Bootstrap/Load: Improve docs for error reporting
Make it clearer that wp_debug_mode will change this based on the WP_DEBUG constant and also make it clearer where this list comes from.

Props sasagar, schlessera, jorbin.
Fixes #41902.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-14 19:28:00 +00:00
Sergey Biryukov c0fa1f1e10 Docs: Update documentation in `phpunit/includes/abstract-testcase.php` per the documentation standards.
Follow-up to [44902].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@50913


git-svn-id: http://core.svn.wordpress.org/trunk@50522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-14 19:09:06 +00:00
Sergey Biryukov 982c389125 Docs: Clarify the `@since` note for `unlink-homepage-logo` in `get_custom_logo()`.
This should make it clearer that the value applies to the `custom-logo` theme feature.

Follow-up to [48039], [48283], [48749], [48757], [48758], [48832].

Props joyously.
See #51075, #52628.
Built from https://develop.svn.wordpress.org/trunk@50912


git-svn-id: http://core.svn.wordpress.org/trunk@50521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-13 12:54:04 +00:00
ryelle a6e6e4f935 Toolbar: Reset box-shadow on links.
This prevents any theme-added `box-shadow` styles from applying to the toolbar items.

Props sabernhardt, florianbrinkmann.
Fixes #40594.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 21:22:00 +00:00
ryelle 750697e837 Login, Users: Use a monospace font to display passwords.
When typing a password, the input field should use a monospace font. It's easier to distinguish letters in monospace fonts, which makes it easier to accurately read passwords.

Props robdxw, utz119, hedgefield, hareesh-pillai.
Fixes #40275.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 19:59:02 +00:00
Clorith d55ae83ddc Site Health: Remove status text indentation.
This removes the left-side margin from the status text in the Site Health dashboard widget, which caused the text to be slightly indented, and not centered under the status indicator circle.

Follow-up to [50833].

See #52966.
Built from https://develop.svn.wordpress.org/trunk@50845


git-svn-id: http://core.svn.wordpress.org/trunk@50454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 14:21:01 +00:00
Sergey Biryukov 6f2d4403c8 Post Thumbnails: Display the "Remove featured image" link in the classic editor in red color.
This matches the color of the "Move to Trash" link and other similar links for destructive actions in the admin.

Props monikarao, hareesh-pillai, sabernhardt, hellofromTonya.
Fixes #45198.
Built from https://develop.svn.wordpress.org/trunk@50844


git-svn-id: http://core.svn.wordpress.org/trunk@50453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 10:14:03 +00:00
desrosj f812323f13 Build/Test Tools: Update the several dependencies.
This updates the following dependencies:

- `grunt` from `1.3.0` to `1.4.0`.
- `grunt-legacy-util` from `2.0.0` to `2.0.1`.
- `sass` from `1.32.11` to `1.32.12`.
- `sinon-test` from `3.0.0` to `3.1.0`.
- `uglify-js` from `3.13.4` to `3.13.6`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50843


git-svn-id: http://core.svn.wordpress.org/trunk@50452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 20:12:15 +00:00
desrosj f221b3eb54 External Libraries: Update the Requests library to version `1.8.0`.
While some of the changes in the `1.8.0` release have already been copied to WordPress Core in earlier releases (see [38727], [46258], [47902] and [49382]), this release contains additional improvements, including:

- A significant performance fix when using cURL.
- Improved compliance with RFC2616.

The library has also been moved under the WordPress project’s GitHub organization and can now be found at https://github.com/WordPress/Requests.

Props jrf, dd32, rmccue, justinahinon, netweb, schlessera, TimothyBJacobs, soulseekah, ozh, skithund, carlalexander, travisnorthcutt, desrosj.
Fixes #53101.
Built from https://develop.svn.wordpress.org/trunk@50842


git-svn-id: http://core.svn.wordpress.org/trunk@50451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 19:42:02 +00:00
davidbaumwald 2e762721b1 Bundled Theme: Update `twenty_twenty_one_password_form` function to actually use a `$post` parameter.
The `twentytwentyone` filtered `the_password_form` with a `twenty_twenty_one_password_form` callback that, by default, passed only one parameter that was assumed to be the post or post ID.  However, the first parameter for `the_password_form` is the filtered output value.  This fix updates both the filter reference and callback to use two parameters: `$output` and `$post`. 

Props burhandodhy, mukesh27.
Fixes #53091.
Built from https://develop.svn.wordpress.org/trunk@50841


git-svn-id: http://core.svn.wordpress.org/trunk@50450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 18:26:01 +00:00
davidbaumwald 9cd6547f13 Docs: Update `help` key documentation link in REST API response.
Props dd32, mukesh27, audrasjb, SergeyBiryukov.
Fixes #53162.
Built from https://develop.svn.wordpress.org/trunk@50840


git-svn-id: http://core.svn.wordpress.org/trunk@50449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 18:05:02 +00:00
Sergey Biryukov 86491779ec Coding Standards: Adds spacing so `define()` statements displayed when creating a network.
This ensures that the code intended to be copied to `wp-config.php` conforms to WordPress Coding Standards.

Props paulschreiber, johnjamesjacoby.
Fixes #53182.
Built from https://develop.svn.wordpress.org/trunk@50839


git-svn-id: http://core.svn.wordpress.org/trunk@50448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 17:10:02 +00:00
Sergey Biryukov bc175dca8c Editor: Some documentation and test improvements for loading separate assets for core blocks:
* Move `should_load_separate_core_block_assets()` to a more appropriate place.
* Update DocBlocks and inline comments per the documentation standards.
* Document the `$wp_styles` global in `wp_maybe_inline_styles()`.
* List the expected result first in unit test assertions.
* Remove a duplicate unit test.
* Add missing `@covers` tags.

Follow-up to [50836], [50837].

See #50328, #52620, #53180.
Built from https://develop.svn.wordpress.org/trunk@50838


git-svn-id: http://core.svn.wordpress.org/trunk@50447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 16:28:02 +00:00
gziolo 7f804f8436 Editor: Fix regression introduced with loading separate block assets
Related to [50836]. load-styles.php doesn't load the should_load_separate_core_block_assets function and that causes an error 500 - which in turn makes the dashboard appear unstyled.

Props aristath.
Fixes #53180.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 14:16:01 +00:00
gziolo 8df663cbfa Editor: Enqueue script and style assets only for blocks present on the page
Adds styles for individual core blocks to make it possible to render only styles for those blocks that are rendered on the page (frontend). This is optinal functionality for start that can be controlled with the new `separate_core_block_assets` filter.

In addition to that, styles can be inlined when `path` is passed when registering an individual styles. This functionality can be changed with the new `styles_inline_size_limit` filter. The maximum size of inlined styles in bytes defaults to 20 000.

Props aristath, aduth, westonruter, mcsf.
Fixes #50328, #52620.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 09:43:08 +00:00
desrosj 9ec439903d Posts, Post Types: Enable revisions for the `wp_block` post type.
This allows site owners to take advantage of revisions while broader improvements to block management and reusable blocks are explored.

Props matveb, audrasjb, desrosj.
Fixes #53072.
Built from https://develop.svn.wordpress.org/trunk@50835


git-svn-id: http://core.svn.wordpress.org/trunk@50444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-10 18:38:59 +00:00
desrosj 41de9e3fd3 Network and Sites: Display site icons in the My Sites menu.
This updates the My Sites dropdown menu on multisite installs to display the site icon for each site. When a site icon is not selected, the default WordPress logo will continue showing.

Props rmccue, joemcgill, afercia, audrasjb, desrosj.
Fixes 46657.
Built from https://develop.svn.wordpress.org/trunk@50834


git-svn-id: http://core.svn.wordpress.org/trunk@50443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-10 18:24:01 +00:00
Sergey Biryukov c8e4bb5d70 Site Health: Improve the appearance of Site Health Status dashboard widget.
This better utilizes the available screen space on wider screens.

Props mblach, hedgefield, Clorith.
Fixes #52966.
Built from https://develop.svn.wordpress.org/trunk@50833


git-svn-id: http://core.svn.wordpress.org/trunk@50442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-10 14:56:00 +00:00
Sergey Biryukov 0a8cfcd0d7 Coding Standards: Use strict comparison in `wp-admin/includes/screen.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50832


git-svn-id: http://core.svn.wordpress.org/trunk@50441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-09 20:27:02 +00:00
Sergey Biryukov f30138fd8a Docs: Correct `@since` tags for new properties and functions related to infinite scrolling in Media Library.
Follow-up to [50829].

See #50105, #40330, #52628.
Built from https://develop.svn.wordpress.org/trunk@50831


git-svn-id: http://core.svn.wordpress.org/trunk@50440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-08 11:22:03 +00:00
joedolson 34e71f3d94 Permalinks: Add labels for permalink configuration fields.
If the current server configuration doesn't allow WordPress to edit permalink settings, the textarea with new rules to use was not labeled. Add labels and aria-describedby pointing to the field description.
 
Props sabernhardt
Fixes #53142.
Built from https://develop.svn.wordpress.org/trunk@50830


git-svn-id: http://core.svn.wordpress.org/trunk@50439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 23:51:04 +00:00
joedolson 9b6710c43c Media: Remove infinite scroll from media library and modal.
Replace infinitely autoloading behavior on scroll with a user-controlled load more button. Fix a long standing accessibility issue in the media library. Infinite scroll poses a wide range of problems for accessibility, usability, and performance.

This change modifies the library to load 40 items in the initial view, with a load more button to load the next 40 items and a button to move focus from the load more region to the first of the most recently added items.

The text for communicating the jump target was broadly discussed, agreeing that the text incorporated here would most concisely and clearly convey the purpose of the button, and any further detail is learnable from use.
 
Props afercia, adamsilverstein, joedolson, audrasjb, francina 
Fixes #50105. See #40330. 
Built from https://develop.svn.wordpress.org/trunk@50829


git-svn-id: http://core.svn.wordpress.org/trunk@50438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 23:19:03 +00:00
John Blackbourn bdaca9bffc Docs: Miscellaneous docblock updates.
See #52628

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


git-svn-id: http://core.svn.wordpress.org/trunk@50437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 20:16:00 +00:00
desrosj 03dc655612 Docs: Use correct `@since` tag notation.
This corrects the version number specified by the `@since` tag for the `delete_theme` and `deleted_theme` action hooks introduced in [50826] to contain a full, 3 digit version.

Props ocean90.
See #16401.
Built from https://develop.svn.wordpress.org/trunk@50827


git-svn-id: http://core.svn.wordpress.org/trunk@50436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 18:26:02 +00:00
desrosj 102d9569c2 Themes: Introduce the `delete_theme` and `deleted_theme` action hooks.
This change introduces the `delete_theme` and `deleted_theme` action hooks, which fire immediately before and after an attempt to delete a theme, respectively.

Props scottconnerly, ptahdunbar, pbiron, vetyst, desrosj.
Fixes #16401.
Built from https://develop.svn.wordpress.org/trunk@50826


git-svn-id: http://core.svn.wordpress.org/trunk@50435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 16:09:59 +00:00
Sergey Biryukov 0082070074 Plugins: Escape the currently installed version number on Add Plugins screen.
The number is displayed in the plugin details modal if a newer version is already installed.

Props m0ze, bmcculley, ayeshrajans.
Fixes #53020.
Built from https://develop.svn.wordpress.org/trunk@50825


git-svn-id: http://core.svn.wordpress.org/trunk@50434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 13:49:58 +00:00
gziolo b8871304cf Editor: Update WordPress packages from Gutenberg 10.5
Applies changes between the Gutenberg plugin v10.4 and v10.5. It contains the latest version of WordPress packages and PHP changes applied to non-experimental features.

Props youknowriad.
See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 11:48:27 +00:00
Sergey Biryukov 8cfc803e28 Docs: Correct the `aria-current` array key in the documentation for two widget filters.
This applies to `nav_menu_link_attributes` and `page_menu_link_attributes` filters.

Follow-up to [42808], [44416].

Props jnylen0, chetan200891, alexstine.
See #43522, #52628.
Built from https://develop.svn.wordpress.org/trunk@50823


git-svn-id: http://core.svn.wordpress.org/trunk@50432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 09:46:58 +00:00
Sergey Biryukov 5354201954 Media: Avoid an infinite loop between `wp_getimagesize()` and `wp_get_image_mime()`.
As a result of the recent changes, both functions were calling each other if the `exif` PHP extension is not available.

The issue is now resolved by calling the `getimagesize()` PHP function directly, instead of the `wp_getimagesize()` wrapper.

Follow-up to [50146], [50810], [50814], [50815], [50818-50821].

See #35725.
Built from https://develop.svn.wordpress.org/trunk@50822


git-svn-id: http://core.svn.wordpress.org/trunk@50431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 09:33:01 +00:00
Sergey Biryukov c6028577a4 Media: Remove an extra variable and a redundant check in `WP_Image_Editor_Imagick::set_quality()`.
`wp_get_webp_info()` returns either a string or `false` for the `type` key, so we can just check for the string directly.

Follow-up to [50810], [50814], [50815], [50818-50820].

See #35725.
Built from https://develop.svn.wordpress.org/trunk@50821


git-svn-id: http://core.svn.wordpress.org/trunk@50430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-06 15:04:57 +00:00
Sergey Biryukov bff31c970e Docs: Correct documentation for `wp_get_webp_info()` return results.
Follow-up to [50810], [50814], [50815], [50818], [50819].

See #35725.
Built from https://develop.svn.wordpress.org/trunk@50820


git-svn-id: http://core.svn.wordpress.org/trunk@50429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-06 13:58:57 +00:00
Sergey Biryukov 7b2335eb40 Media: Remove `_wp_webp_is_lossy()` for now.
The function was only used in a single place in core.

Follow-up to [50810], [50814], [50815], [50818].

Props johnjamesjacoby.
See #35725.
Built from https://develop.svn.wordpress.org/trunk@50819


git-svn-id: http://core.svn.wordpress.org/trunk@50428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-06 11:10:57 +00:00
Sergey Biryukov 8b18915601 Media: Correct an early return condition in `wp_get_webp_info()`.
Previously, this would only have evaluated to `true` if `wp_get_image_mime()` returned `false`.

Follow-up to [50810], [50814], [50815].

See #35725.
Built from https://develop.svn.wordpress.org/trunk@50818


git-svn-id: http://core.svn.wordpress.org/trunk@50427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-06 10:21:01 +00:00
desrosj af4b043a69 Site Health: Include more ImageMagick/Imagick information in the Media Handling section.
This adds additional information to the Media Handling section of the Site Health Info page. When ImageMagick is used as the site’s image editor, a full list of file formats supported will now be shown. This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Additionally, the version of Imagick installed. This will help site owners debug issues with generating images on the PHP side.

Some variables have also been renamed to more accurately represent what is being stored.

Props Clorith, desrosj.
Fixes #53022.
Built from https://develop.svn.wordpress.org/trunk@50817


git-svn-id: http://core.svn.wordpress.org/trunk@50426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 19:21:59 +00:00
davidbaumwald f415fa5ea2 Comments: Remove fourth parameter on `remove_filter` call.
In `class-walker-comment.php`, a `remove_filter` call on `comment_text` passed a fourth parameter which was not needed.  This change removes the extra argument.

Props diddledan, SergeyBiryukov.
Fixes #53113.
Built from https://develop.svn.wordpress.org/trunk@50816


git-svn-id: http://core.svn.wordpress.org/trunk@50425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 18:54:57 +00:00
Sergey Biryukov 16c42e467d Media: Move retrieving WebP image size information into `wp_getimagesize()`.
Remove `_wp_get_image_size()`.

Follow-up to [50146], [50810], [50814].

Props johnjamesjacoby.
See #35725.
Built from https://develop.svn.wordpress.org/trunk@50815


git-svn-id: http://core.svn.wordpress.org/trunk@50424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 18:47:57 +00:00
Sergey Biryukov 0778849c12 Media: Some documentation and test improvements for WebP support:
* Document that WebP constants are only defined in PHP 7.1+.
* Correct the `$filename` parameter type in `wp_get_webp_info()`.
* Use a consistent message when skipping tests due to the lack of WebP support.
* Remove unnecessary `else` branches after `markTestSkipped()`.
* Replace `assertEquals()` with more appropriate assertions.

Follow-up to [50810].

See #35725.
Built from https://develop.svn.wordpress.org/trunk@50814


git-svn-id: http://core.svn.wordpress.org/trunk@50423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 17:08:01 +00:00
Sergey Biryukov e21dfba663 Themes: Remove the "Featured" tab on Add Themes screen.
Themes displayed in this tab were actually random, and have not been selected to be featured to new WordPress users.

The tab had already been removed from the Theme Directory, and with this change, the options in the admin area and in the directory will match again.

The "Popular" tab is now displayed instead as the default view.

Props poena, kjellr, celloexpressions.
Fixes #49487. See #meta5044.
Built from https://develop.svn.wordpress.org/trunk@50813


git-svn-id: http://core.svn.wordpress.org/trunk@50422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 15:54:59 +00:00
desrosj 960952fd9b Formatting: Verify emails with `+` characters are valid.
This adds an assertion to confirm that `is_email()` considers email addresses with a `+` valid.

Props SergeyBiryukov, ayeshrajans.
Fixes #53130.
Built from https://develop.svn.wordpress.org/trunk@50812


git-svn-id: http://core.svn.wordpress.org/trunk@50421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 16:06:59 +00:00
Sergey Biryukov adae6bc86d Docs: Further synchronize documentation for some Plugin API functions.
Follow-up to [50807].

See #50531.
Built from https://develop.svn.wordpress.org/trunk@50811


git-svn-id: http://core.svn.wordpress.org/trunk@50420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 15:01:58 +00:00
Adam Silverstein 524030edfa Images: enable WebP support.
Add support for uploading, editing and saving WebP images when supported by the server.

Add 'image/webp' to supported mime types. Correctly identify WebP images and sizes even when PHP doesn't support WebP. Resize uploaded WebP files (when supported) and use for front end markup.

Props markoheijne, blobfolio, Clorith, joemcgill, atjn, desrosj, spacedmonkey, marylauc, mikeschroder, hellofromtonya, flixos90.
Fixes #35725.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 14:44:58 +00:00
desrosj e7e4b84263 General: Use correct escaping function for form `action` attributes.
Props chintan1896, audrasjb.
Fixes #53150.
Built from https://develop.svn.wordpress.org/trunk@50809


git-svn-id: http://core.svn.wordpress.org/trunk@50418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 13:47:58 +00:00
desrosj 5ced9a5afe General: Use correct escaping function for the plugin icon URL.
Props chintan1896, audrasjb.
Fixes #53151.
Built from https://develop.svn.wordpress.org/trunk@50808


git-svn-id: http://core.svn.wordpress.org/trunk@50417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 13:38:58 +00:00
Sergey Biryukov ef28363c7b Plugins: Standardize the terminology used for actions, filters, and callback functions.
Use `$hook_name` when referring to a filter or action hook name, and `$callback` when referring to a callback function.

This brings more consistency to parameter names in Plugin API functions.

Includes minor code layout fixes for better readability and reordering some functions in a more logical order.

Props johnbillion, jrf, SergeyBiryukov.
Fixes #50531.
Built from https://develop.svn.wordpress.org/trunk@50807


git-svn-id: http://core.svn.wordpress.org/trunk@50416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 10:48:03 +00:00
Sergey Biryukov 6f2fa9ef42 Twenty Twenty-One: Fix "Opening PHP tag must be on a line by itself" WPCS issue.
Follow-up to [50802].

See #52938.
Built from https://develop.svn.wordpress.org/trunk@50806


git-svn-id: http://core.svn.wordpress.org/trunk@50415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-03 14:35:02 +00:00
Sergey Biryukov 8641429845 Coding Standards: Fix a whitespace at end of line issue in `wp-admin/includes/class-wp-comments-list-table.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50805


git-svn-id: http://core.svn.wordpress.org/trunk@50414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-03 14:10:00 +00:00
Sergey Biryukov 4f2c63bbf6 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-posts-list-table.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50804


git-svn-id: http://core.svn.wordpress.org/trunk@50413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-03 13:57:04 +00:00
Sergey Biryukov 29cd5d902d Upgrade/Install: Display plugin and theme update counts on WordPress Updates screen.
This restores the information that was previously included in a title attribute tooltip on pending updates link in the toolbar.

Follow-up to [50801].

Props sabernhardt, audrasjb, mukesh27, davidbaumwald.
Fixes #53031.
Built from https://develop.svn.wordpress.org/trunk@50803


git-svn-id: http://core.svn.wordpress.org/trunk@50412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-02 16:54:06 +00:00
Sergey Biryukov 85d526c5d0 Twenty Twenty-One: Display page title as the H1 heading when a static page is selected as the "Posts page".
This ensures that the heading represents the content of the page. Previously, the site title was displayed instead.

Props sabernhardt, justinahinon, rianrietveld, mukesh27, francina, audrasjb, Boniu91.
Fixes #52938.
Built from https://develop.svn.wordpress.org/trunk@50802


git-svn-id: http://core.svn.wordpress.org/trunk@50411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-01 18:14:05 +00:00
joedolson 6c9dfaede8 Toolbar: Remove title attribute on pending updates link.
Remove the title attribute from the link, wrap the link icon and numeric indicator with the `aria-hidden` attribute, and add a `.screen-reader-text` span so screen readers hear a link that has relevant context without requiring translators to deal with appended strings. Removes the individual counts of theme and plugin updates from the attribute, as those were already buggy and didn't include translation counts.

Props afercia, Mte90, sabernhardt, audrasjb
Fixes #26562. See #53031.
Built from https://develop.svn.wordpress.org/trunk@50801


git-svn-id: http://core.svn.wordpress.org/trunk@50410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-30 22:55:06 +00:00
Sergey Biryukov 267061c959 External Libraries: Upgrade PHPMailer to version 6.4.1.
Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.4.1

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.4.0...v6.4.1

Props ayeshrajans.
Fixes #53114.
Built from https://develop.svn.wordpress.org/trunk@50799


git-svn-id: http://core.svn.wordpress.org/trunk@50408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-29 20:30:06 +00:00
gziolo f6f8094b1d Editor: Fix typo in image default size setting
Related change in Gutneberg: https://github.com/WordPress/gutenberg/pull/31324

Props mamaduka.
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-29 10:12:05 +00:00
davidbaumwald 589e89231a Coding Standards: Update `$out` in `WP_Widget_Pages` with a more meaningful name.
Rename an `$out` variable to `$output` for consistency with other widget classes..

Props mukesh27.
Fixes #53059.
Built from https://develop.svn.wordpress.org/trunk@50797


git-svn-id: http://core.svn.wordpress.org/trunk@50406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-28 20:55:03 +00:00
desrosj 4a73e53df4 Build/Test Tools: Correctly test `grunt clean` when built to run from `src`.
Because the `--` separator was missing, the `--dev` flag was not being passed to the script, thus not testing properly.

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50796


git-svn-id: http://core.svn.wordpress.org/trunk@50405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-28 19:07:06 +00:00
Sergey Biryukov 754714ba43 Coding Standards: Fix a precision alignment issue in `wp-admin/includes/template.php`.
Follow-up to [49223].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50795


git-svn-id: http://core.svn.wordpress.org/trunk@50404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-28 18:55:05 +00:00
youknowriad 4f7ace4f9c Block Editor: Update the bundled block patterns.
This updates the block patterns included by default on WordPress
to give them more personality and to make use of the design tools
that has been added to the editor.

Props onemaggie, melchoyce, kjellr, beafialho, gziolo.
Fixes #52846.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-28 10:38:05 +00:00
Sergey Biryukov 8cd601c8ba REST API: Check the results of `get_metadata()` in `WP_REST_Meta_Fields` methods.
This avoids PHP warnings in case the function returns boolean `false` instead of an array.

Props david.binda.
Fixes #53099.
Built from https://develop.svn.wordpress.org/trunk@50793


git-svn-id: http://core.svn.wordpress.org/trunk@50402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-27 18:36:04 +00:00
Sergey Biryukov cbfa060298 Docs: Document the usage of `$current_user` global in `get_user_by()`.
Follow-up to [50790].

Props paaggeli, mukesh27.
Fixes #53088.
Built from https://develop.svn.wordpress.org/trunk@50792


git-svn-id: http://core.svn.wordpress.org/trunk@50401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-27 17:49:06 +00:00
Sergey Biryukov b2117d7299 Posts, Post Types: Pass the post object to `the_password_form` filter.
Props silb3r.
Fixes #29008.
Built from https://develop.svn.wordpress.org/trunk@50791


git-svn-id: http://core.svn.wordpress.org/trunk@50400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-26 15:38:05 +00:00
Peter Wilson de519f9dfe Users: Share current user instance across functions.
Share the `WP_User` instance for the current user between the functions `get_userdata()` and `wp_get_current_user()`. Both functions return the `$current_user` global for the current user.

Force refresh the `$current_user` global within `clean_user_cache()` by immediately re-calling `wp_set_current_user()` with the current user's ID. This ensures any changes to the current user's permissions or other settings are reflected in the global. As a side-effect this immediately rewarms the current user's cache.

Props chaion07, chriscct7, donmhico, hellofromtonya, lukecarbis, peterwilsoncc, rmccue, TimothyBlynJacobs.
Fixes #28020.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-26 01:03:59 +00:00
Peter Wilson 868ad5a313 Build/Tests tools: Improve `get_bookmark()` test coverage.
Props hellofromtonya, peterwilsoncc.
See #52988.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-26 01:00:05 +00:00
Sergey Biryukov 1ad7538792 Plugins: When loading a plugin in a "sandbox" on activation, do it once.
This avoids a fatal error if the plugin is already included, e.g. in unit tests.

Follow-up to [50787].

See #31104.
Built from https://develop.svn.wordpress.org/trunk@50788


git-svn-id: http://core.svn.wordpress.org/trunk@50397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-25 13:21:05 +00:00
Sergey Biryukov fe549286d5 Plugins: When loading a plugin in a "sandbox" on activation, do it in a separate function.
This avoids accidentally overriding some variables in the scope of `activate_plugin()`, e.g. `$silent` or `$network_wide`.

Plugins expecting to have access to `$network_wide` directly on inclusion should receive it as an argument of the activation hook callback instead, on any of these actions:

* `activate_plugin`
* `activate_{$plugin}`
* `activated_plugin`

Follow-up to [28644].

Props Mike_Cowobo, dd32, DrewAPicture, mensmaximus, SergeyBiryukov.
Fixes #31104.
Built from https://develop.svn.wordpress.org/trunk@50787


git-svn-id: http://core.svn.wordpress.org/trunk@50396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-24 18:04:04 +00:00
Aaron Jorbin 926cd0afee Bootstrap/Load: Add Function for reliable timing data
Adds timer_float which can be used to get the time elapsed so far during the PHP script. Should make it easier to display the page generation time in the footer of admin.

WordPress should expose timing data as a float in the most accurate manner possible. timer_stop() has two problems: it uses an initial timestamp generated later than it needs to be and its formatted return value can not reliably be used as a number (some locales swap commas and periods, for example).

Props andy, matt, jorbin.
Fixes #39163.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-23 19:49:05 +00:00
Sergey Biryukov 75d7c7e8d9 Coding Standards: Use strict comparison in `wp-admin/includes/update-core.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50785


git-svn-id: http://core.svn.wordpress.org/trunk@50394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-23 14:51:05 +00:00
desrosj 64b4c21c1f Build/Test Tools: Remove Internet Explorer 11 from the `browserslist`.
This officially removes support for Internet Explorer 11 in the CSS files run through the build process in Core.

Individual tickets should be opened for removing each manually maintained area of the code base targeting IE11.

The resulting changes to CSS files are included in this commit.

Fixes #53077.
Built from https://develop.svn.wordpress.org/trunk@50784


git-svn-id: http://core.svn.wordpress.org/trunk@50393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 22:58:05 +00:00
Sergey Biryukov 8ef335a566 Coding Standards: Remove loose comparison in `wp-admin/includes/plugin-install.php`.
This more closely represents how the active installations count is displayed in the Plugin Directory.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50783


git-svn-id: http://core.svn.wordpress.org/trunk@50392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 19:18:05 +00:00
desrosj 2d7eb07747 Build/Test Tools: Update the `caniuse-lite` database.
This updates the `caniuse-lite` database to the most recent version (`1.0.30001214`) by running `npx browserslist@latest --update-db`.

The resulting changes after running `grunt precommit:css` are also included in this commit.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50782


git-svn-id: http://core.svn.wordpress.org/trunk@50391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 00:56:05 +00:00
Sergey Biryukov aa3d0715ab Docs: Add a `@since` note to `wp_mail()` about using `is_email()` for validation.
Follow-up to [48645].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@50781


git-svn-id: http://core.svn.wordpress.org/trunk@50390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 19:47:01 +00:00
Sergey Biryukov 784b1fb1b1 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-terms-list-table.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50780


git-svn-id: http://core.svn.wordpress.org/trunk@50389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 18:53:00 +00:00
davidbaumwald 5500f370fd Coding Standards: Fix minor, inline spacing issue in `wp-admin/setup-config.php`.
See #52627.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 18:31:07 +00:00
davidbaumwald e0d4745393 External Libraries: Update Underscore to version 1.13.1.
A full set of changes can be found on GitHub: https://github.com/jashkenas/underscore/compare/1.12.1...1.13.1.

Follow-up to [50650].

Props hareesh-pillai.
See #45785.
Built from https://develop.svn.wordpress.org/trunk@50778


git-svn-id: http://core.svn.wordpress.org/trunk@50387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 17:55:19 +00:00
gziolo 267f9d7479 Editor: Shape block editor filters to work better with the Gutenberg plugin
This should allow to use new filters in the Gutenberg plugin and therefore it prevents deprecation warnings when in the debug mode.

See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 09:32:06 +00:00
gziolo f4f125b869 Editor: Abstract block editor configuration
There are several WordPress hooks defined on the server that depend on $post object that isn’t present on the new screens like edit site, edit widgets, or edit navigation. This patch deprecates existing filters and introduces replacements that are context-aware.

Props azaozz, andraganescu, jeremyfelt, nosolosw, youknowriad.
See #52920.




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


git-svn-id: http://core.svn.wordpress.org/trunk@50385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 05:12:05 +00:00
Peter Wilson 6ce6abd8c0 Upgrade/Install: Prevent possible type errors during installation.
Prevent a `TypeError` from occurring during installation if `wp-config.php` is not writable. In PHP 8.0 this can cause a fatal error, in earlier versions of PHP a warning would be thrown.

Account for a change in type returned by `fopen()` coming in a future version of PHP. Minor coding standards fixes in the `/wp-admin/setup-config.php` file.

Props xknown, hellofromTonya, jrf, peterwilsoncc.
See #51423.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 01:33:03 +00:00
desrosj 0a27442af5 Build/Test Tools: Update several dependencies.
This updates the following dependencies:

- `cssnano` from version `4.1.10` to `4.1.11`.
- `grunt-webpack` from `4.0.2` to `4.0.3`.
- `qunit` from `12.14.1` to `12.15.0`.
- `sass` from `1.32.8` to `1.32.11`.
- `uglify-js` from `3.13.3` to `3.13.4`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50774


git-svn-id: http://core.svn.wordpress.org/trunk@50383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-20 20:02:47 +00:00
desrosj 9d2315b409 External Libraries: Update `Moment.js` to the latest version.
This updates the `moment` script from version `2.27.0` to `2.29.1`.

Props shital-patel, hareesh-pillai.
Fixes #52853.
Built from https://develop.svn.wordpress.org/trunk@50773


git-svn-id: http://core.svn.wordpress.org/trunk@50382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-20 19:15:21 +00:00
Sergey Biryukov 253e1e0413 Code Modernization: Bring consistency to preparing some fields on Network Settings screen:
* `illegal_names`
* `limited_email_domains`
* `banned_email_domains`

If any of these options have a falsey value, treat it as an empty string. This addresses a PHP 8.1+ deprecation notice when passing a `null` value to `str_replace()`.

Additionally, avoid unnecessary type casting for better performance.

Props hellofromTonya, jrf, SergeyBiryukov.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50772


git-svn-id: http://core.svn.wordpress.org/trunk@50381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-20 14:49:08 +00:00
Peter Wilson 02894474ba Build/Test Tools: Add seeking support to stream test library.
Introduces seeking to the `WP_Test_Stream` stream wrapper. This allows the testing of `wp_getimagesize()` and `wp_read_image_metadata()` among others. Includes tests for the latter.

Props hellofromTonya.
Fixes #52922.
See #52826.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-20 03:03:07 +00:00
Sergey Biryukov 596b9ed6ce Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-media-list-table.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50770


git-svn-id: http://core.svn.wordpress.org/trunk@50379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-19 11:41:07 +00:00
Sergey Biryukov 0cbb526928 Docs: Correct comment format in `wp-admin/edit-tags.php`, remove extra space.
Props immeet94.
Fixes #46428.
Built from https://develop.svn.wordpress.org/trunk@50769


git-svn-id: http://core.svn.wordpress.org/trunk@50378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-18 14:29:03 +00:00
Sergey Biryukov 81ad8ccdf6 Coding Standards: Fix WPCS issues in `wp-admin/includes/class-wp-comments-list-table.php`.
* Rename method argument in `WP_Comments_List_Table::floated_admin_avatar()` per the naming conventions.
* Use strict comparison in `WP_Comments_List_Table::handle_row_actions()`.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50768


git-svn-id: http://core.svn.wordpress.org/trunk@50377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-18 13:55:07 +00:00
Sergey Biryukov ed067531ec Coding Standards: Use strict comparison in `wp-admin/includes/class-walker-nav-menu-edit.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50767


git-svn-id: http://core.svn.wordpress.org/trunk@50376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 12:22:03 +00:00
Clorith f7536fd387 Site Health: Remove Ajax requests from dashboard widget.
The Site Health dashboard widget uses the same JavaScript file as the Site Health pages to generate its progress indicator.

This file was also set up to store the current Site Health check results if the current tab being shown isn't the debug information one, this had the side effect of the dashboard being seen as not the debug screen as well.

This now has a conditional making sure it's the status screen it self being displayed, before trying to do any Ajax requests.

Props arena.
Fixes #49814.
Built from https://develop.svn.wordpress.org/trunk@50766


git-svn-id: http://core.svn.wordpress.org/trunk@50375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 11:29:02 +00:00
Clorith 954842868f Site Health: Correct array key for the default tab
Use `reset` to get the label from the first tab entry as the default if no tab is defined.
This ensures even if the tab order is changed, or tabs are removed, no warnings will be thrown.

Follow-up to [50764].

See #47225.
Built from https://develop.svn.wordpress.org/trunk@50765


git-svn-id: http://core.svn.wordpress.org/trunk@50374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 10:55:03 +00:00
Clorith eea98a5426 Site Health: Support custom sub-menus and pages.
Allow developers to extend the Site Health screen with their own custom navigation tabs and pages.

This implements a new filter, `site_health_navigation_tabs`, which takes an associated array of tab identifiers/slugs, and tab labels, allowing developers to add their own subpage to the Site Health interface as new tabs.

To output a custom page, or add to an existing page, the `site_health_tab_content` action is triggered whenever the `tab` query argument is present and not empty. This action includes the current tab as its argument, which a developer would match against to only output content when relevant.

Props ramiy for initial patch.
Fixes #47225.
Built from https://develop.svn.wordpress.org/trunk@50764


git-svn-id: http://core.svn.wordpress.org/trunk@50373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 01:14:01 +00:00
desrosj b4fac1593d Build/Test Tools: Make adjustments to how often old branches are tested.
This adjusts the workflow responsible for testing old branches to only test old branches once per month. This more closely resembles the testing practices previously in place on TravisCI.

The latest, supported branch will continue to be tested twice per month.

This also makes adjustments so that the workflow is run whenever changes are made to it. This will help verify changes without having to wait until the next scheduled run.

Fixes #52653.
Built from https://develop.svn.wordpress.org/trunk@50763


git-svn-id: http://core.svn.wordpress.org/trunk@50372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-16 17:26:06 +00:00
Sergey Biryukov afb02cb315 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-automatic-updater.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50762


git-svn-id: http://core.svn.wordpress.org/trunk@50371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-16 12:01:15 +00:00
gziolo ad48a15387 Editor: Update WordPress packages to use with WordPress 5.8
In the response to the discussion during the Dev Chat, I'm doing a first pass to keep WordPress packages up to date in the WordPress 5.8 release cycle.

See https://github.com/WordPress/wordpress-develop/pull/1176 for more details.

Props youknowriad, aristath, andraganescu.
See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-15 15:19:43 +00:00
gziolo 660443bbc7 Editor: Backport changes for WordPress packages added in 5.7.1
Props peterwilsoncc.
See #52912.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-15 11:03:35 +00:00
Sergey Biryukov ac9f1a4685 Coding Standards: Give a variable in `WP_Automatic_Updater::after_core_update()` a more meaningful name.
Follow-up to [25841], [25873], [25882].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50759


git-svn-id: http://core.svn.wordpress.org/trunk@50368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-15 10:31:08 +00:00
desrosj e445660ee3 REST API: Allow authors to read their own password protected posts.
Allow authenticated users to read the contents of password protected posts if they have the `edit_post` meta capability for the post.

Props xknown, zieladam, peterwilsoncc, swissspidy, timothyblynjacobs.
Built from https://develop.svn.wordpress.org/trunk@50717


git-svn-id: http://core.svn.wordpress.org/trunk@50326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-14 23:24:04 +00:00
desrosj ac930e0e5f External libraries: Include upstream GetID3 fix for PHP 8.
Props jrf, xknown.
Built from https://develop.svn.wordpress.org/trunk@50714


git-svn-id: http://core.svn.wordpress.org/trunk@50323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-14 23:10:04 +00:00
davidbaumwald b7280388d6 Privacy: Ensure "Export Personal Data" does not generate invalid JSON.
Previously, when exporting personal data, if the JSON encoding of the data failed, the invalid JSON was still written to `export.json`.  This change captures the JSON encoding failure and adds a notice to the UI.  

Props hellofromTonya, jrf, SergeyBiryukov.
Fixes #52892.
Built from https://develop.svn.wordpress.org/trunk@50713


git-svn-id: http://core.svn.wordpress.org/trunk@50322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-14 21:28:08 +00:00
desrosj 294c370d72 Upgrade/Install: Correct the alignment of error messages for the language installer.
This makes the CSS selector used to right align certain form related elements more specific. This prevents any error messages from being right aligned.

Props sabernhardt, audrasjb.
Fixes #52989.
Built from https://develop.svn.wordpress.org/trunk@50712


git-svn-id: http://core.svn.wordpress.org/trunk@50321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-14 14:11:05 +00:00
Sergey Biryukov 0cd72ec474 Site Health: Correct test result status for the HTTPS test.
The supported status values for Site Health tests are `good`, `recommended`, and `critical`.

Follow-up to [50660].

Props TimothyBlynJacobs.
Fixes #52783.
Built from https://develop.svn.wordpress.org/trunk@50710


git-svn-id: http://core.svn.wordpress.org/trunk@50319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-14 13:02:08 +00:00
Peter Wilson 793da8732f Bundled Themes: Bump versions for WordPress 5.7.1.
Twenty Twenty-One: Bump version to 1.3
Twenty Seventeen: Bump version to 2.7

Props desrosj, mukesh27, peterwilsoncc.
Fixes #52859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 23:49:06 +00:00
Sergey Biryukov a274a14bdd Coding Standards: Use strict comparison in `wp-admin/includes/class-custom-image-header.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50707


git-svn-id: http://core.svn.wordpress.org/trunk@50316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 19:05:04 +00:00
Sergey Biryukov 35de0a48fb Coding Standards: Use strict comparison in `wp-admin/includes/class-custom-background.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50706


git-svn-id: http://core.svn.wordpress.org/trunk@50315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 18:01:04 +00:00
davidbaumwald d6a1170c70 I18N: Add context to strings when updating a plugin or theme with a ZIP package.
After [48390], plugins and themes can be updated with an uploaded ZIP file.  Strings were added for comparing the "current" and "uploaded" versions of a plugin or theme, but lacked context for each as to the object being referenced.  This change adds a `plugin` or `theme` context to each of these strings for disambiguation.

Props dimadin, SergeyBiryukov.
Fixes #53017.
Built from https://develop.svn.wordpress.org/trunk@50705


git-svn-id: http://core.svn.wordpress.org/trunk@50314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 17:38:05 +00:00
Dominik Schilling 2e6178bf3d Build/Test Tools: Remove an extra space in the job name for PHPUnit tests.
See #52625.
Built from https://develop.svn.wordpress.org/trunk@50704


git-svn-id: http://core.svn.wordpress.org/trunk@50313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 16:12:06 +00:00
gziolo b31964a44b Blocks: Add is_default handling to server side block styles registry
Ensures that register_block_style lets developer pass `is_default` flag to mark one of the block style variations as the default one.

Props mukesh27, xavivars.
Fixes #53006.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 08:04:13 +00:00
davidbaumwald 989ec57389 Feeds: Rename "Summary" to "Excerpt" in Reading Settings.
On the "Reading Settings" page, the post excerpt was referred to as a "Summary".  For consistency with the rest of Core, this change updates "summary" to "excerpt" both in the setting and the relevant help tab.

Props SergeyBiryukov, ravipatel, mukesh27.
Fixes #52987.
Built from https://develop.svn.wordpress.org/trunk@50702


git-svn-id: http://core.svn.wordpress.org/trunk@50311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-12 22:34:04 +00:00
Sergey Biryukov 8e059f3657 Coding Standards: Rewrite a fragment in `request_filesystem_credentials()` for clarity and to avoid repetition.
Follow-up to [8540], [8865].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50701


git-svn-id: http://core.svn.wordpress.org/trunk@50310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-12 18:34:05 +00:00
Sergey Biryukov 82042a0377 Coding Standards: Use strict comparison in `wp-admin/includes/file.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50700


git-svn-id: http://core.svn.wordpress.org/trunk@50309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-12 18:19:09 +00:00
Sergey Biryukov c569c157f0 Coding Standards: Simplify the check for parent terms in `export_wp()`.
This is more consistent with similar checks elsewhere in core.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50699


git-svn-id: http://core.svn.wordpress.org/trunk@50308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-11 13:44:13 +00:00
Dominik Schilling f3034f1b1c Customize: Set `playsinline` attribute for custom header videos.
With the `playsinline` attribute the video can also autoplay on mobile browsers without asking the user to open it up fullscreen.
Also, change all video element properties to use boolean values.

Props klevyke, ocean90.
Fixes #50111.
Built from https://develop.svn.wordpress.org/trunk@50698


git-svn-id: http://core.svn.wordpress.org/trunk@50307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-10 12:40:05 +00:00
Dominik Schilling 8780574d11 Build/Test Tools: Remove remaining Travis CI references.
* Remove `travis:` tasks in Gruntfile.js.
* Remove status badge in README.md that comes from Travis CI via shields.io.
* Remove Travis CI related skipping in the `WP_UnitTestCase_Base::skipOnAutomatedBranches()` test method and related Docker environment variables.

Props johnbillion, SergeyBiryukov, ocean90.
See #52161.
Fixes #52666.
Built from https://develop.svn.wordpress.org/trunk@50697


git-svn-id: http://core.svn.wordpress.org/trunk@50306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-10 12:07:04 +00:00
Sergey Biryukov 2a7238f658 Coding Standards: Give a variable in `wp-admin/themes.php` a more meaningful name.
Follow-up to [20029].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50696


git-svn-id: http://core.svn.wordpress.org/trunk@50305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-10 12:01:10 +00:00
Rachel Baker 3d04a220be REST API: Move the `rest_jsonp_enabled` filter before setting the Content-Type header.
Fixes an issue where if JSONP was disabled the `Content-Type` HTTP header was still set to `application/javascript`.  

Props dd32, TimothyBlynJacobs.
Fixes #52691.
Built from https://develop.svn.wordpress.org/trunk@50695


git-svn-id: http://core.svn.wordpress.org/trunk@50304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-09 21:28:08 +00:00
Sergey Biryukov 68b73d3696 Themes: Remove unused code fragment from `wp-admin/themes.php`.
Follow-up to [25666], [26141].

Props mukesh27, rkradadiya.
Fixes #53005.
Built from https://develop.svn.wordpress.org/trunk@50694


git-svn-id: http://core.svn.wordpress.org/trunk@50303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-09 11:49:05 +00:00
Sergey Biryukov bdacea193a Editor: Use a consistent way to retrieve post ID on Edit Post screens.
Props mukesh27, ravipatel, davidbaumwald.
Fixes #52995.
Built from https://develop.svn.wordpress.org/trunk@50693


git-svn-id: http://core.svn.wordpress.org/trunk@50302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-09 11:31:09 +00:00
Sergey Biryukov 57da3e7813 Coding Standards: Remove unnecessary `unset()` calls in `WP_Importer` methods.
Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant.

Props jrf, ravipatel, rachelbaker, mukesh27.
Fixes #52996.
Built from https://develop.svn.wordpress.org/trunk@50692


git-svn-id: http://core.svn.wordpress.org/trunk@50301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-08 11:12:08 +00:00
Sergey Biryukov 7d65ff4f7a Coding Standards: Use strict comparison in `wp-admin/includes/dashboard.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50689


git-svn-id: http://core.svn.wordpress.org/trunk@50298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 18:34:07 +00:00
ryelle d2d09b9a7a Accessibility: Administration: Update various background colors for increased contrast.
This ensures that contrast between text color and background meets the WCAG 2.0 AA recommended value. The following locations were changed:

- Network List Tables: Use lighter background colors for site status indicator.
- Nav Menus: Use a lighter background color for invalid menu items.
- Pointers: Use a darker background for pointer header.
- Themes: Use darker background on filter button hover.
- Customizer: Use darker background for selected widget.

Follow-up to [50025], [50571].
Props kebbet, melchoyce, peterwilsoncc.
Fixes #52760.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 16:38:09 +00:00
gziolo e6eb25fda4 Editor: Ensure @wordpress/inteface package is listed as a dependency
Discovered when backporting changes for WordPress 5.7.1 release.

See #52991.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 11:39:19 +00:00
gziolo e60fe4f2f3 Build Tools: Update development dependencies from WP packages
This patch updates only development dependencies for WordPress packages to align better with the Gutenberg plugin.

See #52991.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 11:15:58 +00:00
Peter Wilson f992857b31 Build tools: Revert `package-lock.json` change in [50682].
See #52768.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 01:34:05 +00:00
Peter Wilson 312da2b826 Media: Do not lazy load hidden images or embeds.
Improve the check for sourceless or dimensionless media when determining if the lazy loading attribute should be added to iframes and images. Never include the lazy loading attribute on embeds of WordPress posts as the iframe is initially hidden.

Including `loading="lazy"` on initially hidden iframes and images can prevent the media from loading in some browsers.

Props adamsilverstein, fabianpimminger, flixos90, johnbillion, jonkastonka, joyously, peterwilsoncc, SergeyBiryukov, SirStuey, swissspidy.
Fixes #52768.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-07 01:01:05 +00:00
Sergey Biryukov 21bcc7c836 Login and Registration: Check if `$_GET['login']` is set before using it in `wp-login.php`.
This avoids an "Undefined index" PHP notice displayed as part of password reset process if `$_GET['key']` is set, but `$_GET['login']` is not.

Props satrancali.
Fixes #52980.
Built from https://develop.svn.wordpress.org/trunk@50677


git-svn-id: http://core.svn.wordpress.org/trunk@50286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 18:39:10 +00:00
desrosj c1e7f92d6a Build/Test Tools: Prevent PHPUnit tests on `push` for forks/private mirrors.
The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every `push` event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Fixes #52983.
Built from https://develop.svn.wordpress.org/trunk@50670


git-svn-id: http://core.svn.wordpress.org/trunk@50282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 15:14:10 +00:00
desrosj 94dae2b608 Bundled Themes: Update the “Tested up to” value.
“Tested up to” is not displayed on the theme directory or within the WordPress dashboard, but should be updated to be accurate for anyone reading the theme’s source code.

Follow up to [50508].

Fixes #52859.
Built from https://develop.svn.wordpress.org/trunk@50669


git-svn-id: http://core.svn.wordpress.org/trunk@50281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 14:43:08 +00:00
desrosj 2b73649b52 Build/Test Tools: Update some dependencies.
This updates `elliptic` to version `6.5.4` through `npm audit fix`.

`uglify-js` is also updated to version `3.13.3`, and `grunt-contrib-uglify` to version `5.0.1`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50668


git-svn-id: http://core.svn.wordpress.org/trunk@50280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 14:31:21 +00:00
desrosj cfe859c1f3 Twenty Twenty-One: Rebuild IE specific editor stylesheet.
This was not updated to include the changes from [50493].

Fixes #52981. See #52702.
Built from https://develop.svn.wordpress.org/trunk@50667


git-svn-id: http://core.svn.wordpress.org/trunk@50279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 14:12:05 +00:00
desrosj caa5abc6c1 Build/Test Tools: Update dependencies in default themes.
This updates several dependencies in the Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One default themes.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50666


git-svn-id: http://core.svn.wordpress.org/trunk@50278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 14:07:07 +00:00
Sergey Biryukov 53c0882200 Coding Standards: Use strict comparison in `wp-admin/includes/credits.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50665


git-svn-id: http://core.svn.wordpress.org/trunk@50277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 13:47:02 +00:00
Sergey Biryukov 48cd688076 Coding Standards: Use strict comparison in `wp-admin/includes/comment.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50664


git-svn-id: http://core.svn.wordpress.org/trunk@50276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 13:45:09 +00:00
Peter Wilson 72a04aa045 Options, Meta APIs: Update default color scheme swatch to match CSS changes.
Update the default/fresh theme color swatch displayed on user profile pages to match CSS changes made during the 5.7 release cycle.

Props audrasjb, desrosj, ninetyninew, ryelle.
Fixes #52750.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 05:44:07 +00:00
Peter Wilson 7442fe63a0 Site Health: Reduce false reports of HTTPS failures.
Reduce severity of failing HTTPS tests from critical to warning. Stop reporting failures if the site is being accessed over HTTPS but `wp_is_https_supported()` indicates a lack of support.

Props annalamprou, AnotherDave, ayeshrajans, bobbingwide, Clorith, dragongate, eatsleepcode, gab81, geoffrey1963, Ipstenu, k3nsai, mmuyskens, nicegamer7, peterwilsoncc, pwallner, SergeyBiryukov, TimothyBlynJacobs, Toru.
Fixes #52783.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-06 03:24:08 +00:00
Sergey Biryukov b8f35c130c Coding Standards: Give some variables in `WP_Importer` a more meaningful name.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50658


git-svn-id: http://core.svn.wordpress.org/trunk@50270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-05 10:50:03 +00:00
Sergey Biryukov a338f84f32 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-filesystem-*.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50657


git-svn-id: http://core.svn.wordpress.org/trunk@50269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-05 10:38:07 +00:00
Sergey Biryukov 10a084a067 Coding Standards: Move some translator comments to the correct place.
Follow-up to [46273], [50060], [50117].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50654


git-svn-id: http://core.svn.wordpress.org/trunk@50266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-04 18:30:05 +00:00
Sergey Biryukov b6e32b9d4f REST API: Correct `enum` validation for numeric values.
When validating `enum` values as `integer` or `number`, consider a number with a zero fractional part to be equivalent to an integer of the same value.

In `rest_are_values_equal()`, when comparing two values of type `int` or `float` (in any combination), first cast both of them to `float` and then compare.

This matches some test cases from the official JSON Schema test suite.

Follow-up to [50010].

Props yakimun, stefanjoebstl, TimothyBlynJacobs, rachelbaker.
Fixes #52932.
Built from https://develop.svn.wordpress.org/trunk@50653


git-svn-id: http://core.svn.wordpress.org/trunk@50265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-04 18:07:04 +00:00
Sergey Biryukov 907bfe74cd Coding Standards: Use strict comparison in `wp-admin/includes/class-core-upgrader.php`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50652


git-svn-id: http://core.svn.wordpress.org/trunk@50264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-04 16:49:09 +00:00
Sergey Biryukov b70c00d6ac Build/Test Tools: Rename some Grunt tasks to use hyphens instead of camelCase.
This makes the task names more consistent with other tasks.

Follow-up to [41043], [48096], [50650].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50651


git-svn-id: http://core.svn.wordpress.org/trunk@50263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-03 12:46:10 +00:00
davidbaumwald 3912ca99fd External Libraries: Update Underscore to version 1.12.1.
Full set of changes at https://github.com/jashkenas/underscore/compare/1.8.3...1.12.1.  
The new version includes a `sourceMappingURL` that causes a build failure, so this change 
also introduces a task to remove this from the source during the build.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 19:42:21 +00:00
desrosj 75923de5ef Build/Test Tools: Prevent the workflow for testing old branches from running on forks.
This adds a conditional statement to ensure the workflow that tests old branches only runs on the official `wordpress-develop` mirror. This prevents it from running on forks and private mirrors.

See #52653.
Built from https://develop.svn.wordpress.org/trunk@50648


git-svn-id: http://core.svn.wordpress.org/trunk@50260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 16:22:04 +00:00
davidbaumwald cc0ce2c91d Editor: Update the default writing prompt to match the block editor.
Recently merged, https://github.com/WordPress/gutenberg/pull/29611, changed the default writing prompt text.  WordPress core offers the `write_your_story` filter with a default value using the same text.  This change updates the default text to match the recent change in the block editor.

Props Joen, SergeyBiryukov.
Fixes #52948.
Built from https://develop.svn.wordpress.org/trunk@50647


git-svn-id: http://core.svn.wordpress.org/trunk@50259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 16:08:04 +00:00
davidbaumwald 133c4e2e50 Docs: Clarify return results for a non-existing ID in metadata functions.
[48658] documented that various metadata functions return false for an invalid ID. However, that does not clarify what an invalid ID is: a non-numeric, zero, or negative value. This change adds the clarification in all relevant metadata function docblocks.

Props icopydoc, SergeyBiryukov, davidkryzaniak, audrasjb.
Fixes #51797.
Built from https://develop.svn.wordpress.org/trunk@50641


git-svn-id: http://core.svn.wordpress.org/trunk@50253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 15:49:05 +00:00
Sergey Biryukov 526dfa8b12 KSES: Add `object-position` to the list of safe CSS properties.
This resolves an issue with the Cover block, where the `object-position` property is removed from the content when a non-admin user saves the post, leading to block recovery loop.

Props Mamaduka, aristath.
Fixes #52961.
Built from https://develop.svn.wordpress.org/trunk@50634


git-svn-id: http://core.svn.wordpress.org/trunk@50246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 12:41:09 +00:00
davidbaumwald 5767dbd5ff Build/Test Tools: Cleanup `link-manager.zip` after REST API tests are finished.
Introduced in [48242], the `link-manager` plugin is copied from `DIR_TESTDATA/plugins` to `DIR_TESTDATA` during the REST API unit tests, but was not cleaned up afterward.  This created a "dirty" local working copy.  This change `unlink`s the copied plugin from `DIR_TESTDATA` after unit tests are completed.

Props johnbillion, TimothyBlynJacobs, desrosj, rachelbaker.
Fixes #52579.
Built from https://develop.svn.wordpress.org/trunk@50633


git-svn-id: http://core.svn.wordpress.org/trunk@50245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-01 20:41:07 +00:00
davidbaumwald 739dfb756f Coding Standards: Remove some extra whitespace in `get_item_schema`.
Introduced in [50527].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50632


git-svn-id: http://core.svn.wordpress.org/trunk@50244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-01 15:54:04 +00:00
davidbaumwald ab6c10948f Coding Standards: Removing unnecessary parentheses from `require_once` in `wp-admin/options-privacy.php`.
In [47198], parentheses were removed from `include` and `require` statements, as they are language constructs, not function calls.  However, [50161] introduced a new `require_once` instance in `wp-admin/options-privacy.php`.  This change removes the unnecessary parentheses.

See #53627.
Built from https://develop.svn.wordpress.org/trunk@50631


git-svn-id: http://core.svn.wordpress.org/trunk@50243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-01 15:36:08 +00:00
Sergey Biryukov 3697386083 Editor: Consolidate enqueueing block editor assets in `wp-includes/default-filters.php`.
Follow-up to [44157], [46111], [48537], [50620].

See #52920.
Built from https://develop.svn.wordpress.org/trunk@50629


git-svn-id: http://core.svn.wordpress.org/trunk@50241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-01 11:46:09 +00:00
Dominik Schilling 07b7afd60a External Libraries: Upgrade PHPMailer from 6.3.0 to 6.4.0.
6.4.0 reverts a change that made the `mail()` and sendmail transports set the envelope sender if one isn't explicitly provided, as it was causing problems in specific PHP/server configurations.

Release post: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.4.0
Changelog: https://github.com/PHPMailer/PHPMailer/compare/v6.3.0...v6.4.0

Props Synchro, tigertech, ayeshrajans, galbaras, audrasjb, SergeyBiryukov, desrosj, ocean90.
Fixes #52822.
Built from https://develop.svn.wordpress.org/trunk@50628


git-svn-id: http://core.svn.wordpress.org/trunk@50240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-31 21:30:03 +00:00
Aaron Jorbin f4678dff60 Build/Test & External Libraries : Fix jQuery deprecation.
jQuery.isArray is deprecated. Array.isArray is safe and used in other parts of the code base.

See: #51812

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


git-svn-id: http://core.svn.wordpress.org/trunk@50239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-31 20:29:06 +00:00
Sergey Biryukov 4d1595b6d4 Docs: Document the `import_id` parameter of `wp_insert_post()`.
Follow-up to [9100].

Props donmhico.
Fixes #52943.
Built from https://develop.svn.wordpress.org/trunk@50621


git-svn-id: http://core.svn.wordpress.org/trunk@50234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-31 13:05:06 +00:00
gziolo 6d42a21103 Editor: Enqueue assets for format library for the block editor
Ensures that `wp-format-library` assets are always loaded for the block editor. Otherwise, they have to be loaded individually for every screen that needs it. It's similar to how `wp-block-directory` assets are handled.

Props ellatrix.
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-31 05:52:10 +00:00
desrosj 5c451da5e9 External Libraries: Update polyfill versions in the script loader.
Follow up to [50615, 50617].

See #52854.
Built from https://develop.svn.wordpress.org/trunk@50619


git-svn-id: http://core.svn.wordpress.org/trunk@50232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-30 17:57:05 +00:00
Sergey Biryukov f701ad4999 Coding Standards: Remove some extra whitespace in `_wp_translate_postdata()`.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50618


git-svn-id: http://core.svn.wordpress.org/trunk@50231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-30 15:19:03 +00:00
desrosj 85c90c4e01 External Libraries: Update the path to `polyfill-library` files in Webpack.
Follow up to [50615].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-30 14:49:04 +00:00
Sergey Biryukov 1a9eb60625 Docs: Add documentation for the `::setup_export_contents_test` method used in personal data export tests.
Follow-up to [50613].

Props hellofromTonya.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50616


git-svn-id: http://core.svn.wordpress.org/trunk@50229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-30 14:24:03 +00:00
desrosj 7eee8521b0 External Libraries: Update several polyfill libraries.
This updates the following polyfill libraries:

- `formdata-polyfill` from `3.0.13` to `3.0.20`.
- `objectFitPolyfill` from `2.3.4` to `2.3.5`.
- `polyfill-library` from `3.42.0` to `3.104.0`.

Props gziolo, desrosj.
Fixes #52854.
Built from https://develop.svn.wordpress.org/trunk@50615


git-svn-id: http://core.svn.wordpress.org/trunk@50228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-30 14:16:33 +00:00
davidbaumwald 67d6f5f6c6 Docs: Fix indentation for `wp_term_query->construct` method parameters.
The `fields` and `orderby` properties in `WP_Term_Query` are arrays and each accepts a variety of keys.  To properly indent each key in the docblock, a `*` should be used, not `-`.

Props whyisjake, audrasjb, SergeyBiryukov.
Fixes #52839.
Built from https://develop.svn.wordpress.org/trunk@50614


git-svn-id: http://core.svn.wordpress.org/trunk@50227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-29 21:35:07 +00:00
Sergey Biryukov 69a7063a49 Code Modernization: Check if the `_export_data_grouped` post meta is an array when generating a personal data export file.
This avoids a fatal error on PHP 8 in `wp_privacy_generate_personal_data_export_file()` if the `_export_data_grouped` post meta exists but is not an array.

Additionally, refactor unit tests for the function to:
* Reduce redundant code
* Switch to data provider
* Test on the full HTML output instead of select pieces of the output
* Expand unhappy path coverage

Follow-up to [43012], [44786], [47146], [47278].

Props hellofromTonya, jrf, xknown.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50613


git-svn-id: http://core.svn.wordpress.org/trunk@50226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-29 19:37:04 +00:00
Sergey Biryukov 59d32bfe24 Build/Test Tools: Remove explicit puppeteer dependency.
This was added in [48177] to fix an issue where Puppeteer was not being installed correctly as a dependency of `@wordpress/wp-scripts`. This has been fixed, so this explicit dependency can be removed.

Props isabel_brison, desrosj, SergeyBiryukov.
Fixes #52843.
Built from https://develop.svn.wordpress.org/trunk@50612


git-svn-id: http://core.svn.wordpress.org/trunk@50225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-29 18:07:25 +00:00
Sergey Biryukov dc4de0d5a5 Login and Registration: Add the "Error:" prefix to some password reset messages.
This makes the messages more consistent with other error messages related to authentication and registration.

Follow-up to [50589].

Props dd32.
Fixes #52914.
Built from https://develop.svn.wordpress.org/trunk@50611


git-svn-id: http://core.svn.wordpress.org/trunk@50224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-28 10:24:05 +00:00
Sergey Biryukov 05631ab4cd Docs: Spell "non-existent" in a consistent way.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50610


git-svn-id: http://core.svn.wordpress.org/trunk@50223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-27 13:34:12 +00:00
desrosj 87a4101834 Build/Test Tools: Update some `devDependencies`.
This updates the following `devDependencies`:

- `sinon` from `9.2.4` to `10.0.0`.
- `uglify-js` from `3.13.1` to `3.13.2`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50598


git-svn-id: http://core.svn.wordpress.org/trunk@50211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 15:47:21 +00:00
desrosj 755882578e Twenty Twelve: Change theme version back to `3.3`.
Because the changes in Twenty Twelve did not impact site look or functionality, version 3.4 of Twenty Twelve was not released in coordination with WordPress 5.7.

This reverts the portion of [50508] relevant to Twenty Twelve, changing the version back to 3.3 so that version 3.4 is not skipped accidentally when there are changes that should be released.

See #52704.
Built from https://develop.svn.wordpress.org/trunk@50596


git-svn-id: http://core.svn.wordpress.org/trunk@50209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 15:28:05 +00:00
desrosj 219cf1dd5f Build/Test Tools: Run code coverage workflow when the file is updated.
When the workflow file is updated, it should always be run to verify changes.

Follow up to [50592].

See #52786.
Built from https://develop.svn.wordpress.org/trunk@50595


git-svn-id: http://core.svn.wordpress.org/trunk@50208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 15:14:04 +00:00
desrosj 2a76425048 Build/Test Tools: Run code coverage workflow using parallel jobs.
This splits the code coverage workflow into two separate jobs, allowing single site and multisite to run in parallel. This cuts the total workflow run time in half.

Fixes #52923.
Built from https://develop.svn.wordpress.org/trunk@50594


git-svn-id: http://core.svn.wordpress.org/trunk@50207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 15:11:04 +00:00
desrosj ae3ae14958 Build/Test Tools: Do not checkout the Importer plugin in the Code Coverage workflow.
Since [50285], the WordPress Importer plugin (which is required for the test suite to run successfully) has been installed as part of the `npm run env:install` script.

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50593


git-svn-id: http://core.svn.wordpress.org/trunk@50206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 14:59:03 +00:00
desrosj 952acb240a Build/Test Tools: Fix code coverage reporting to generate report from `src`.
Since [50441-50442] switched the test workflows to run from `src` instead of `build`, code coverage reporting has stopped working. This was caused by the code coverage configuration continuing to reference `build`. This corrects the configuration so coverage reporting can resume.

This change also introduces the `workflow_dispatch` event to the workflow, which will allow committers to manually run the workflow when desired. For example, to confirm changes to the test suite do not break reporting.

This also adds the `phpunit.xml.dist` and `tests/phpunit/multisite.xml` files to the `paths` list. Since these files are responsible for configuring the test suite and code coverage reporting, any changes to them should verify that no problems were introduced.

Props jrf, johnbillion.
Fixes #52786. See #51734.
Built from https://develop.svn.wordpress.org/trunk@50592


git-svn-id: http://core.svn.wordpress.org/trunk@50205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 13:25:05 +00:00
desrosj bbc301ca6e Build/Test Tools: Run test workflows on old branches on a schedule.
On TravisCI, old branches still receiving security updates were tested on a regular basis. This ensured tests continued to pass as time passed even if updates were not made to these branches.

On GitHub Actions, there is no interface to configure this (TravisCI had a UI), but there is a `schedule` event that can trigger workflow runs on cron that can be used to accomplish the same thing.

This introduces a workflow file that runs twice a month (on the 1st and 15th) to verify the tests within older branches.

Because the `schedule` event only runs within the primary branch, the appropriate workflows in each old branch will be triggered manually through the `workflow_dispatch` trigger using the GitHub REST API. `workflow_dispatch` will need to be added to all workflows in all old branches in order for the event to dispatch successfully.

Fixes #52653.
Built from https://develop.svn.wordpress.org/trunk@50590


git-svn-id: http://core.svn.wordpress.org/trunk@50203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 13:08:03 +00:00
Sergey Biryukov 2c6e1dc1f9 Login and Registration: Restore the "Error:" prefix for the "Unknown username" message.
This makes the message more consistent with other error messages related to authentication and registration.

Follow-up to [46417].

Props dd32.
See #52914, #52915.
Built from https://develop.svn.wordpress.org/trunk@50589


git-svn-id: http://core.svn.wordpress.org/trunk@50202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 12:14:07 +00:00
Peter Wilson cc7bdc71e8 Media: Conditionally pass 2nd parameter to `getimagesize()`.
In the wrapper function `wp_getimagesize()` check if the second parameter was passed before sending it to the PHP function `getimagesize()`. 

The PHP function has a different execution path depending on the number of parameters passed, this ensures the wrapper function follows the appropriate path.

Follow up to [50552].
Props azaozz, hellofromtonya, Mista-Flo, peterwilsoncc, rinatkhaziev, RogerTheriault, SergeyBiryukov, terriann, whyisjake.
Fixes #52826.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 00:09:04 +00:00
davidbaumwald 9b8c498eea Privacy: Print screen reader text for the "Copy suggested policy text..." action button.
This change switches out `sprintf` for `printf` on the "Copy suggested policy text from..." button screen reader text.  Also, wrap the actual button text in a `<span aria-hidden="true">` to prevent both the button text and the screen reader text from being spoken.

Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes #52891.
Built from https://develop.svn.wordpress.org/trunk@50585


git-svn-id: http://core.svn.wordpress.org/trunk@50198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 20:21:04 +00:00
davidbaumwald bf267e05ca Docs: Fix description for `$htmlhint` argument in code editor settings.
Introduced in [41558].

Props sabernhardt.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50583


git-svn-id: http://core.svn.wordpress.org/trunk@50196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 20:00:05 +00:00
davidbaumwald eaffb58ce8 Posts, Post Types: Remove `/` from non-self-closing "clear" `div` tags.
In [49178], self-closing `br` tags were switched to non-self-closing `div` elements for "clearing" purposes, but the self-closing "/" remained in place.  This fix removes the unnecessary slash.

Props pavelvisualcomposer, audrasjb, sabernhardt, akabarikalpesh, SergeyBiryukov.
Fixes #52878.
Built from https://develop.svn.wordpress.org/trunk@50582


git-svn-id: http://core.svn.wordpress.org/trunk@50195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 19:33:04 +00:00
desrosj 2e34561536 Build/Test Tools: Disable `fail-fast` for the NPM testing workflow.
This disables the `fail-fast` option in the GitHub Actions workflow for testing NPM. This allows all jobs in the test matrix to complete, even if one fails, painting a clear picture of where the issue lies.

Follow up to [50435].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50579


git-svn-id: http://core.svn.wordpress.org/trunk@50192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 15:10:06 +00:00
ryelle 14eddefa5e Login, Registration: Prevent button misalignment on login screen.
Replace the float CSS removed in [50569], which is used to align the login & register buttons.

Props mukesh27, audrasjb.
Fixes #52834.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 14:23:03 +00:00
Sergey Biryukov d6cc4f1aec Query: Consistently include a space in parentheses in `WP_Meta_Query::get_sql_for_clause()`.
Props jillebehm, kaavyaiyer, hareesh-pillai.
Fixes #49279.
Built from https://develop.svn.wordpress.org/trunk@50576


git-svn-id: http://core.svn.wordpress.org/trunk@50189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-25 12:39:07 +00:00