Commit Graph

18399 Commits

Author SHA1 Message Date
Peter Wilson ac37144d96 Block Editor: Update SVN props to ignore new asset files.
Update svn props to ignore additional CSS, JavaScript and source map files following the package updates preparing for WordPress 5.9.

Follow up to [52042], [52046], [52069] and [52089].
See #54337, #53361.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 23:42:00 +00:00
Peter Wilson d05a2816ce Block Editor: Update SVN props to ignore new asset files.
Update svn props to ignore additional CSS, JavaScript and source map files following the package updates preparing for WordPress 5.9.

Follow up to [52042], [52046], [52069].
See #54337, #53361.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 23:32:59 +00:00
Peter Wilson f888c5cbbb Login and Registration: Improve messaging for invalid log-out nonces.
Clarify messaging of when `wp_nonce_ays('log-out')` is called due to an invalid log out nonce. The HTML title now describes the action being taken rather than using the generic text "something went wrong".

Props davidkryzaniak, hellofromTonya, peterwilsoncc.
Fixes #52600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 23:09:00 +00:00
davidbaumwald d5f7417686 Bootstrap/Load: Add `HTTP/3` as a valid HTTP protocol.
As of November 2021, the `HTTP/3` protocol is still officially an Internet Draft, but is already supported by 74% of running web browsers and, according to W3Techs, 23% of the top 10 million websites. It has been supported by Google Chrome (including Chrome for Android, and Microsoft Edge, which is based on it) since April 2020 and by Mozilla Firefox since May 2021. Safari 14 (on macOS Big Sur and iOS 14) has also implemented the protocol but support is hidden behind a feature flag.

Based on the wide support, this change adds `HTTP/3` as a valid HTTP protocol.

Props malthert.
Fixes #54404.
Built from https://develop.svn.wordpress.org/trunk@52087


git-svn-id: http://core.svn.wordpress.org/trunk@51679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 23:07:01 +00:00
Sergey Biryukov 878c7c0486 Coding Standards: Use strict comparison in `wp-admin/includes/ms.php`.
Props davidbaumwald, audrasjb.
Fixes #47422.
Built from https://develop.svn.wordpress.org/trunk@52086


git-svn-id: http://core.svn.wordpress.org/trunk@51678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 23:06:01 +00:00
hellofromTonya 9d4d3f8fba HTTP API: Ensure value returned from `'http_allowed_safe_ports'` is an array to avoid PHP 8+ TypeError fatal error.
Adds an `is_array()` check before the `in_array()`. Why? `in_array()` requires a array for the haystack. Any other data type will cause a fatal error on PHP 8.0 or higher:

{{{
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array
}}}

As this is a new filter, this type check properly guards to avoid the fatal error.

Follow-up to [52084].

See #54331.
Built from https://develop.svn.wordpress.org/trunk@52085


git-svn-id: http://core.svn.wordpress.org/trunk@51677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:59:58 +00:00
hellofromTonya 2f84a45fdf HTTP API: Introduce `'http_allowed_safe_ports'` filter in `wp_http_validate_url()`.
Adds a new filter `'http_allowed_safe_ports'` to control which ports are allowed for remote requests. By default, ports 80, 443, and 8080 are allowed for safe remote requests.

Adds tests. 

Follow-up to [24480].

Props xknown, johnbillion, jorbin, costdev, dd32.
Fixes #54331.
Built from https://develop.svn.wordpress.org/trunk@52084


git-svn-id: http://core.svn.wordpress.org/trunk@51676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:39:00 +00:00
davidbaumwald d6de0e4498 Mail: Add `wp_mail_succeeded` hook to `wp_mail`.
Adds a new `wp_mail_succeeded` action in `wp_mail` after the mail is sent.  Also, adds a disclaimer to the hook's docblock, clarifying that the hook's firing doesn't necessarily mean the recipient received the mail, only that the mail was processed without any errors.

Props birgire, donmhico, johnbillion.
Fixes #53826.
Built from https://develop.svn.wordpress.org/trunk@52083


git-svn-id: http://core.svn.wordpress.org/trunk@51675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:27:59 +00:00
hellofromTonya 2c874cfabc Twenty Twenty-One: Add privacy policy link to footer.
If a privacy policy is set, the page links to the footer of the site. As done in the other bundled themes, this link is added using `the_privacy_policy_link()`.

Follow-up to [49216].

Props ryelle, desrosj, kapilpaul, sabernhardt, audrasjb, justinahinon.
Fixes #53445.
Built from https://develop.svn.wordpress.org/trunk@52082


git-svn-id: http://core.svn.wordpress.org/trunk@51674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:26:01 +00:00
desrosj b04ed7ed22 Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.

To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.

Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081


git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 21:02:02 +00:00
TimothyBlynJacobs d224b7cf10 REST API: Expose the site icon in the REST API index.
Props spacedmonkey, palmiak.
Fixes #52321.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 20:37:59 +00:00
TimothyBlynJacobs e2d4385a4f REST API: Introduce Menu management endpoints.
This commit introduces the `/wp/v2/menus`, `/wp/v2/menu-items` and `/wp/v2/menu-locations` REST API endpoints. These endpoints are fully available to users with the `edit_theme_options` capability, but can be read by any user who can edit a REST API available post type.

The `nav_menu` taxonomy and `nav_menu_item` post type now map their capabilities to the `edit_theme_options` primitive capability. This allows developers to provide more fine-grained access control. However, if a developer is currently dynamically removing the `edit_theme_options` capability using `map_meta_cap`, they should use the `user_has_cap` filter instead.

The `wp_update_nav_menu_item()` function has been adjusted to return an error if saving the menu item post or assigning the menu item to a menu generate an error.

Lastly, a new menu item type is introduced, `block`, that can be used to store a Block as a menu item.

Props andraganescu, antonvlasenko, dingo_d, dlh, isabel_brison, kadamwhite, Mamaduka, NateWr, noisysocks, peterwilsoncc, ryelle, schlessera, soean, Spacedmonkey, talldanwp, TimothyBlynJacobs, tobifjellner, westonruter, wpscholar, zieladam.
Fixes #40878.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 19:00:01 +00:00
desrosj c86f41d98b Coding Standards: Minor alignment fix after [52058].
See #52058.
Built from https://develop.svn.wordpress.org/trunk@52078


git-svn-id: http://core.svn.wordpress.org/trunk@51670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 18:51:02 +00:00
desrosj de1c682e0a Themes: Avoid fatal error loading admin styles when `SCRIPT_DEBUG` is `false`.
This removes the use of `get_theme_file_path()` within `WP_Theme_JSON_Resolver` in favor of the similar `get_file_path_from_theme()` method.

The former is found within `wp-includes/link-template.php`, which is not currently loaded when `load-styles.php` attempts to load the necessary styles. `self::get_file_path_from_theme()` was used previously, but this was changed in [52049].

Props Mamaduka, audrasjb, hellofromTonya, jorbin, desrosj.
Fixes #54401. See #54336.
Built from https://develop.svn.wordpress.org/trunk@52077


git-svn-id: http://core.svn.wordpress.org/trunk@51669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 18:08:01 +00:00
Sergey Biryukov ea201ced16 Coding Standards: Revert unrelated change to `wp_send_user_request()`.
This fixes a mix of tabs and spaces in the email template. Spaces inside a string are not considered WPCS errors, and are not required to be converted to tabs.

Follow-up to [52060], [52063].

See #43700.
Built from https://develop.svn.wordpress.org/trunk@52076


git-svn-id: http://core.svn.wordpress.org/trunk@51668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 16:22:58 +00:00
hellofromTonya 80c868534a Login and Registration: Fix failing test for "email already exists" registration error improvement.
Follow-up to [52074].

Fixes #53631.
Built from https://develop.svn.wordpress.org/trunk@52075


git-svn-id: http://core.svn.wordpress.org/trunk@51667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 16:21:01 +00:00
hellofromTonya 0fd9ad6c2f Login and Registration: Improve "email already exists" registration error message.
Adds the `wp_login_url()` login link to the Error message to be more helpful to users when their user email already is registered.

Improves the error message to more clearly communicate next step.

Follow-up to [16009], [22124], [31963].

Props andynick, costdev, dansoschin, sabernhardt, webcommsat.
Fixes #53631.
Built from https://develop.svn.wordpress.org/trunk@52074


git-svn-id: http://core.svn.wordpress.org/trunk@51666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 15:28:59 +00:00
Adam Silverstein e47027ff1f Media: Add "webp" extension to wp.media.controller.Library `isImageAttachment`.
Add "webp" extension to a media extension check, fixing an issue where the last used media
link type was not used for WebP images.

Props almendron, desrosj, kallookoo.
Fixes #53917.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 15:01:00 +00:00
Dominik Schilling 0b45e56052 Editor, Docs: Add documentation for the `$block_editor_context` parameter of the `block_editor_rest_api_preload_paths` hook.
See #52920.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@52072


git-svn-id: http://core.svn.wordpress.org/trunk@51664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 13:00:00 +00:00
youknowriad 55840750c5 Site Editor: Load as full screen by default.
To avoid UI jumps when loading the page, the site-editor.php page
is marked as full screen by default. 
This also matches the behavior of the post editor.

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 09:14:02 +00:00
TimothyBlynJacobs e5a988644b REST API: Regenerate wp-api-generated.js after [52068].
See #53063.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 02:28:00 +00:00
noisysocks c421e9b34a Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9
- First pass at adding the site editor from the Gutenberg plugin to
  wp-admin/site-editor.php.
- Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9.

Follows [52042].
See #54337.
Props youknowriad, aristath, hellofromtonya, gziolo.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 02:17:17 +00:00
TimothyBlynJacobs 84dae82fd3 REST API: Add batch support for posts and terms controllers.
This also exposes the value of `allow_batch` in `OPTIONS` requests to a route.

A future commit will add batch support to more resources.

Props spacedmonkey, chrisvanpatten.
See #53063.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 01:59:02 +00:00
hellofromTonya 5c47273f06 Posts, Post Types: Add `$old_status` parameter to `{$new_status}_{$post->post_type}` action.
Follow-up to [5797], [28106], [31461].

Props aaroncampbell, audrasjb, desrosj, johnbillion, sebastianpisula, swissspidy.
Fixes #36180.
Built from https://develop.svn.wordpress.org/trunk@52067


git-svn-id: http://core.svn.wordpress.org/trunk@51659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 01:30:58 +00:00
hellofromTonya 8853582220 General: Convert `wp_list_filter()` into a wrapper for `wp_filter_object_list()`.
The code in `wp_list_filter()` was a duplicate of `wp_filter_object_list()`, minus the `WP_List_Util::pluck()` (used when `$field` is configured).

In testing the wrapper, discovered an edge case (and potential bug) in `WP_List_Util::filter()` where if the operator matches an empty array was returned without resetting the output property. Without that property being set correctly, `WP_List_Util::get_output()` was not correct. This commit also fixes this by resetting the property to an empty array.  

Follow-up to [15686], [17427], [38928], [51044].

Props pbearne, sergeybiryukov, hellofromTonya.
Fixes #53988.
Built from https://develop.svn.wordpress.org/trunk@52066


git-svn-id: http://core.svn.wordpress.org/trunk@51658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 01:10:59 +00:00
Felix Arntz 780b0399f7 Media: Refine the heuristics to exclude certain images and iframes from being lazy-loaded to improve performance.
This changeset implements the refined lazy-loading behavior outlined in https://make.wordpress.org/core/2021/07/15/refining-wordpress-cores-lazy-loading-implementation/ in order to improve the Largest Contentful Paint metric, which can see a regression from images or iframes above the fold being lazy-loaded. Adjusting this so far has been possible for developers via filters and still is, however this enhancement brings a more accurate behavior out of the box for the majority of themes.

Specifically, this changeset skips the very first "content image or iframe" on the page from being lazy-loaded. "Content image or iframe" denotes any image or iframe that is found within content of any post in the current main query loop as well as any featured image of such a post. This applies both to "singular" as well as "archive" content: On a "singular" page the first image/iframe of the post is not lazy-loaded, while on an "archive" page the first image/iframe of the _first_ post in the query is not lazy-loaded.

This approach refines the lazy-loading behavior correctly for the majority of themes, which use a single-column layout for post content. For themes with multi-column layouts, a new `wp_omit_loading_attr_threshold` filter can be used to change how many of the first images/iframes are being skipped from lazy-loaded (default is `1`). For example, a theme using a three-column grid of latest posts for archives could use the filter to override the threshold to `3` on archive pages, so that the first three content images/iframes would not be lazy-loaded.

Props adamsilverstein, azaozz, flixos90, hellofromtonya, jonoaldersonwp, mte90, rviscomi, tweetythierry, westonruter.
Fixes #53675. See #50425.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 00:36:01 +00:00
hellofromTonya c610440f46 Users: Introduce `wp_list_users()` function.
Introduces a new function called `wp_list_users()`. Similar to other list functions such as `wp_list_authors()`, it lists all the users of the site. Options are available to configure the HTML output.

Following the same pattern of the other list functions, the list's HTML output is rendered by default. Setting the `echo` argument to `false`, returns the list's HTML output.

A new test class is included.

Props afercia, audrasjb, chriscct7, costdev, desrosj, greenshady, hellofromTonya, mte90, nacin, rohan013, sergeybiryukov.
Fixes #15145.
Built from https://develop.svn.wordpress.org/trunk@52064


git-svn-id: http://core.svn.wordpress.org/trunk@51656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 00:23:58 +00:00
joedolson 98cb0591eb Coding Standards: PHP Code style errors.
Fixes coding standards issues.

Follow up to [52060].

See #43700.
Built from https://develop.svn.wordpress.org/trunk@52063


git-svn-id: http://core.svn.wordpress.org/trunk@51655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 00:01:57 +00:00
noisysocks f05f235042 Editor: Add block theme infrastructure
Adds the required infrastructure to render block-based themes. This is sourced
from the Gutenberg plugin.

Fixes #54335.
Props bernhard-reiter, youknowriad, ntsekouras, hellofromtonya.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 23:10:59 +00:00
hellofromTonya 85fedc53ba General: Add "noopener" to `wp_list_bookmarks()` output.
In the bookmarks walker `_walk_bookmarks()`, add a `'noopener'` to the bookmark's `rel` attribute when there's `target` attribute.

Adds a new test class for `wp_list_bookmarks()` and tests for this change.

Follow-up to [3880], [10712].

Props birgire, costdev, hellofromTonya, mukesh27 , sergeybiryukov, tw2113.
Fixes #53839.
Built from https://develop.svn.wordpress.org/trunk@52061


git-svn-id: http://core.svn.wordpress.org/trunk@51653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 23:06:58 +00:00
joedolson a308811553 Coding Standards: PHP Code style errors.
Fixes coding standards issues.

Follow up to [52058].

See #43700.
Built from https://develop.svn.wordpress.org/trunk@52060


git-svn-id: http://core.svn.wordpress.org/trunk@51652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 23:03:58 +00:00
antpb 975f56e42b Media: Change upload button to a file input for better e2e targeting.
Changes the media library upload button to `input type="file"` for better end to end testing capabilities.

Props  justinahinon, joedolson, sabernhardt, audrasjb.
Fixes #54168.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 22:49:00 +00:00
joedolson d00b86ff06 I18N: Add language switcher on login/registration screens.
Load a language switcher on the login and registration screens that allows users to choose any already-installed language. Set user locale on registration.

Props johnbillion, Nikschavan, afercia, sabernhardt, garrett-eclipse, keyur5, paaljoachim, Clorith, tobifjellner.
Fixes #43700.
Built from https://develop.svn.wordpress.org/trunk@52058


git-svn-id: http://core.svn.wordpress.org/trunk@51650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 22:37:59 +00:00
jorgefilipecosta 8e7b8a1837 Add: get_query_pagination_arrow function to core.
Fixes a crash that is happening when using an FSE theme because a function required is missing. Ports the function from the Gutenberg plugin.

Props oandregal, youknowriad.
Built from https://develop.svn.wordpress.org/trunk@52057


git-svn-id: http://core.svn.wordpress.org/trunk@51649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 22:31:58 +00:00
jorgefilipecosta 934efac655 Fix: Linting error affecting trunk.
Props oandregal.
Built from https://develop.svn.wordpress.org/trunk@52056


git-svn-id: http://core.svn.wordpress.org/trunk@51648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:57:58 +00:00
johnjamesjacoby 65866fa233 Admin/Help: add commas to end of multi-line array items.
Follow up to r52053.

See #54357.
Built from https://develop.svn.wordpress.org/trunk@52055


git-svn-id: http://core.svn.wordpress.org/trunk@51647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:55:00 +00:00
jorgefilipecosta d8fe393934 Add: Public functions for interacting with global styles & settings.
This commit ports the public functions to interact with the global styles & settings.

See #54336.
Props oandregal.
Built from https://develop.svn.wordpress.org/trunk@52054


git-svn-id: http://core.svn.wordpress.org/trunk@51646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:45:58 +00:00
johnjamesjacoby 8dfb59d4de Admin/Help: add docs links to several screens.
This change intends to better guide users towards many of the useful resources available on WordPress.org.

* Appearance/Customizer - Add link to Customizer docs.
* Appearance/Editor - Improve link text & destination.
* Privacy Settings - Link to Privacy Settings docs.
* Site Health - Link to Site Health docs.

Props audrasjb, jdy68, webcommsat.

Fixes #54357.
Built from https://develop.svn.wordpress.org/trunk@52053


git-svn-id: http://core.svn.wordpress.org/trunk@51645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:43:01 +00:00
jorgefilipecosta d8da1f0ac9 Add: Global styles user content escaping.
This commit adds global styles user content escaping. In addition, it ports the logic on the Gutenberg plugin implemented on WordPress/gutenberg#28061 to the core.
The logic tries to follow what was done for standard post content.

See #54336.
Props oandregal.
Built from https://develop.svn.wordpress.org/trunk@52052


git-svn-id: http://core.svn.wordpress.org/trunk@51644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:24:59 +00:00
jorgefilipecosta db5d8b5e03 Add: Global Styles Rest endpoints.
This commit ports the global styles rest endpoints from the Gutenberg plugin into the core.

See #54336.
Props oandregal, aristath, timothyblynjacobs, spacedmonkey, youknowriad.
Built from https://develop.svn.wordpress.org/trunk@52051


git-svn-id: http://core.svn.wordpress.org/trunk@51643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:00:07 +00:00
jorgefilipecosta cba4afb663 Fix: Update block-theme-pl_PL.mo file.
See #54336.
Props oandregal.
Built from https://develop.svn.wordpress.org/trunk@52050


git-svn-id: http://core.svn.wordpress.org/trunk@51642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 20:33:59 +00:00
jorgefilipecosta 065c639a2a Update theme.json classes for WordPress 5.9.
This commit ports to core the changes to the classes that deal with theme.json code.

See #54336.
Props oandregal, spacedmonkey, noisysocks, hellofromtonya, youknowriad.
Built from https://develop.svn.wordpress.org/trunk@52049


git-svn-id: http://core.svn.wordpress.org/trunk@51641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 19:19:58 +00:00
Sergey Biryukov 25b9998213 Tests: Remove the `formatting` group from `wp_is_numeric_array()` tests.
Similar to `wp_array_slice_assoc()` or other array-related functions, this appears to be a general-purpose function unrelated to the Formatting component.

Add missing `public` visibility keyword.

Follow-up to [52037].

See #53971.
Built from https://develop.svn.wordpress.org/trunk@52048


git-svn-id: http://core.svn.wordpress.org/trunk@51640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 17:08:59 +00:00
desrosj 80b78b077d Build/Test Tools: Update/Audit NPM dependencies for bundled themes.
This updates several NPM dependencies to their latest (or latest allowed) versions for bundled themes that have a `package.json` file (Twenty Nineteen and newer).

These updates did not result in any changes to the built files in Twenty Nineteen or Twenty Twenty. Some unnecessary parenthesis have been removed from `calc()` function calls within Twenty Twenty-One.

This change also contains several updates to the `package-lock.json` files made by running `npm audit fix` within each of these themes.

See #53361.
Built from https://develop.svn.wordpress.org/trunk@52047


git-svn-id: http://core.svn.wordpress.org/trunk@51639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 16:26:01 +00:00
desrosj 713dd52b78 Build/Test Tools: Update/Audit NPM dependencies for 5.9.
This updates several NPM dependencies to their latest (or latest allowed) versions.

- `autoprefixer` from `9.8.6` to `9.8.8`
- `chalk` from `4.1.1` to `4.1.2`
- `grunt-contrib-concat` from `1.0.1` to `2.0.0`
- `grunt-contrib-jshint` from `3.0.0` to `3.1.1`
- `grunt-contrib-qunit` from `4.0.0` to `5.1.1`
- `qunit` from `2.16.0` to `2.17.2`
- `sass` from `1.34.1` to `1.43.4`
- `sinon` from `11.1.1` to `12.0.1`
- `sinon-test` from `3.1.0` to `3.1.1`
- `uglify-js` from `3.13.9` to `3.14.3`
- `wait-on` from `5.3.0` to `6.0.0`

This change also contains several updates to the `package-lock.json` file made by running `npm audit fix`.

See #53361.
Built from https://develop.svn.wordpress.org/trunk@52046


git-svn-id: http://core.svn.wordpress.org/trunk@51638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 16:15:22 +00:00
hellofromTonya 4ba2fd6f0e Posts/Post Types: Improves the `'is_post_type_viewable'` filter boolean return.
As a follow-up to [52024], simplifies the strict boolean type check to conserve memory and processing. Also includes an explanation of why a strict boolean is required as the returned filtered value. This commit is consistent with the implementation in [52043].

Follow-up to [33666], [36402], [52024].

Props hellofromTonya, peterwilsoncc, cybr, jrf.
Fixes #49628.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 15:34:59 +00:00
desrosj c2a7d2a773 Themes: Remove temporary Full Site Editing safety checks.
These checks were added in [51193] and [51197] as a temporary measure to prevent a site owner from activating a Full Site Editing theme when Gutenberg plugin was not active.

Because Core only had partial support for the features required for FSE, the front end of the site would display a white screen or error message to visitors. Unless the site owner visited the front end, there would be no indication that there was a problem.

Since 5.9 will include the remaining features required for FSE, these checks can be removed.

Props poena, jffng.
Fixes #54366. See #534190.
Built from https://develop.svn.wordpress.org/trunk@52044


git-svn-id: http://core.svn.wordpress.org/trunk@51636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 15:27:59 +00:00
hellofromTonya cc39667fc1 Posts/Post Types: Introduce 'is_post_status_viewable ' filter in `is_post_status_viewable()`.
Introduces a new filter 'is_post_status_viewable' which allows overriding the check.

The function's return signature is a boolean type. This commit ensures
the return signature remains unchanged by requirinng a strict boolean
type of the returned filtered value.

Why?
* To maintain this signature and backwards-compatibility.
* To future prepare for PHP 8.1 and beyond.

An explanation is included in the filter's DocBlock.

Follow-up to [50130].

Props audrasjb, hellofromTonya, peterwilsoncc.
Fixes #54375.
Built from https://develop.svn.wordpress.org/trunk@52043


git-svn-id: http://core.svn.wordpress.org/trunk@51635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 15:21:59 +00:00
youknowriad ebca9841e8 Block Editor: Update the WordPress Packages based on Gutenberg 11.9 RC1.
This brings the JS packages up to date and is the first step that will allow us 
to include the other block editor updates for WordPress 5.9:
FSE infrastrucutre, site editor and global styles.

Props noisysocks.
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 14:29:21 +00:00
jorgefilipecosta 0b4ecc9b23 Add: wp_global_styles custom post type.
This commit adds the wp_global_styles custom post type following the same approach used to add other core custom post types. It also updates the wp_theme taxonomy to include the wp_global_styles post type.
The post type is registered in the same way it is on the plugin we just adapt the location for the core.

See #54336.
Props oandregal.
Built from https://develop.svn.wordpress.org/trunk@52041


git-svn-id: http://core.svn.wordpress.org/trunk@51633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 14:26:00 +00:00
hellofromTonya 3d10105120 General: Introduce polyfills for `str_ends_with()` and `str_starts_with()` added in PHP 8.0.
PHP 8.0 introduced two new functions: `str_ends_with()` and `str_starts_with()`. These perform a case-sensitive check indicating if the string to search in (haystack) ends or begins with the given substring (needle).

These polyfills make these functios available for use in Core.

Ref:
* PHP RFC https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions
* PHP manual `str_ends_with()` https://www.php.net/manual/en/function.str-ends-with.php
* PHP manual `str_starts_with()`  https://www.php.net/manual/en/function.str-starts-with.php

Props costdev, hellofromTonya, pbearne, pbiron.
Fixes #54377.
Built from https://develop.svn.wordpress.org/trunk@52040


git-svn-id: http://core.svn.wordpress.org/trunk@51632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 14:22:57 +00:00
hellofromTonya 87557c6260 General: Introduce polyfill for `str_contains()` added in PHP 8.0.
PHP 8.0 introduced a new function: `str_contains()`. It performs a case-sensitive check indicating if given substring (needle) is contained in the string to search in (haystack).

This polyfill makes this function available for use in Core.

Ref:
* PHP RFC https://wiki.php.net/rfc/str_contains
* PHP manual https://www.php.net/manual/en/function.str-contains.php

Props ayeshrajans, costdev, desrosj, hellofromTonya, knutsp, pbearne.
Fixes #49652.
Built from https://develop.svn.wordpress.org/trunk@52039


git-svn-id: http://core.svn.wordpress.org/trunk@51631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 14:03:58 +00:00
hellofromTonya 10dc403b88 General: Introduce polyfills for `array_key_first()` and `array_key_last()` added in PHP 7.3.0.
PHP 7.3.0 introduced two new functions: `array_key_first()` and `array_key_last()`. These two functions return the first and last key of each array respectively, without affecting the internal state of the array.

The polyfills make these two functions available for use in Core on PHP versions less than 7.3.0.

Ref:
* PHP RFC https://wiki.php.net/rfc/array_key_first_last
* PHP manual `array_key_first()` https://www.php.net/manual/en/function.array-key-first.php
* PHP manual `array_key_last()` https://www.php.net/manual/en/function.array-key-last.php

Props desrosj, pbearne, costdev, hellofromTonya, ayeshrajans, manzoorwanijk, audrasjb, sergeybiryukov.
Fixes #45055.
Built from https://develop.svn.wordpress.org/trunk@52038


git-svn-id: http://core.svn.wordpress.org/trunk@51630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 13:51:57 +00:00
hellofromTonya 1a04cb44d2 General: Add phpunit tests for `wp_is_numeric_array()`.
Adds new test class `Tests_Functions_WpIsNumericArray` for `wp_is_numeric_array()`.

Props pbearne, hareesh-pillai, hellofromTonya.
Fixes #53971.
Built from https://develop.svn.wordpress.org/trunk@52037


git-svn-id: http://core.svn.wordpress.org/trunk@51629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 13:30:56 +00:00
gziolo b519028ab2 Fix relative URLs in inlined block styles that involve external assets
When styles got inlined, relative URLs break. The problem was that URLs inside CSS files are relative to the stylesheet's path, and when styles get inlined that relation is lost. This patch fixes the issue by finding relative URLs which then get modified to be relative to the site's root.

Fixes #54243.
Props aristath, cdyerkes, hellofromtonya.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 13:24:58 +00:00
John Blackbourn 2a3ad7c430 Docs: Various docblock improvements and corrections.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 10:48:59 +00:00
John Blackbourn 4c3a23ba40 Docs: Fix some docblock syntax errors and add a missing canonical reference.
See #53399, #52867, #38942, #53668

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


git-svn-id: http://core.svn.wordpress.org/trunk@51626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 10:44:59 +00:00
antpb 3dc76d614a Media: Adjust alt text info link text.
Previous messaging of this link was confusing given it went to an external source. This change describes more accurately that it will perform the action of taking you to the resource.

Props karmatosed, joedolson, melchoyce, hellofromTonya, afercia, sabernhardt, antpb.
Fixes #48939.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 00:22:57 +00:00
antpb c1f6817cad Media: Remove security messaging in media upload failures.
Previously, when uploading a media item type that is not supported, the default error message claims that the reason it cannot upload is due to security reasons. This is not always true. Now the warning says that the type is not allowed, which is always true.

Props antpb, Presskopp, peterwilsoncc, desrosj, iluy, circlecube, mikeschroder.
Fixes #53626.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 23:29:56 +00:00
joedolson fffde30995 Widgets: Add filter to disable RSS widget icon.
Add a filter that disables output of the icon on RSS feed widgets. Improves accessibility by providing a path to prevent duplicate or invisible links.

Props sabernhardt, Boniu91.
Fixes #52224.
Built from https://develop.svn.wordpress.org/trunk@52031


git-svn-id: http://core.svn.wordpress.org/trunk@51623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 23:04:56 +00:00
joedolson 201f4ddfbe Editor: Update structure of title element for editing.
Re-format the title element for post editing to follow general scheme for WordPress admin screens.

Props SergeyBiryukov.
Fixes #52314.
Built from https://develop.svn.wordpress.org/trunk@52030


git-svn-id: http://core.svn.wordpress.org/trunk@51622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 22:09:56 +00:00
joedolson 56b07f0ea2 Comments: Mark comment text field as required.
Add required asterisk to the comment text field. Historically, the name and email fields are marked as required, but the comment text field is not, though it is actually a required field.

Props infected, solarissmoke, rianrietveld, afercia, sabernhardt, strider72, mai21, audrasjb.
Fixes #16206.
Built from https://develop.svn.wordpress.org/trunk@52029


git-svn-id: http://core.svn.wordpress.org/trunk@51621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 21:14:58 +00:00
antpb 78d274099a Media: Add filter for post thumbnail id.
Introduces new filter `post_thumbnail_id` which allows overriding the default id returned from `get_post_thumbnail_id()`.

Props engelen, alexvorn2, gilbitron, sebastianpisula, SergeyBiryukov, leogermani, rzen, joemcgill, audrasjb.
Fixes #23983.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 20:37:58 +00:00
antpb 5df077df8a Media: Add filter for post thumbnail url.
Introduces new filter `post_thumbnail_url` which allows overriding the default url returned from `wp_get_attachement_image_url()`.

Props ibenic, SergeyBiryukov, jackreichert, audrasjb.
Fixes #40547.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 19:29:00 +00:00
Sergey Biryukov 107d13bc28 Coding Standards: Move `wp-includes/class-http.php` to `wp-includes/class-wp-http.php`.
This renames the file containing the `WP_Http` class to conform to the coding standards.

This commit also includes:

- A new `class-http.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.

Follow-up to [8516], [13274], [33748].

Fixes #54389. See #53359.
Built from https://develop.svn.wordpress.org/trunk@52026


git-svn-id: http://core.svn.wordpress.org/trunk@51618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 01:36:57 +00:00
Sergey Biryukov 6ad1bf0e3e Coding Standards: Rename the `$strResponse` argument to `$str_response` in `WP_Http::processResponse()`.
This fixes a `Variable "$strResponse" is not in valid snake_case format` WPCS warning.

Additionally, rename a `$res` variable to `$response` for clarity.

Follow-up to [8516], [51823], [51826], [51877].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52025


git-svn-id: http://core.svn.wordpress.org/trunk@51617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-06 21:56:59 +00:00
hellofromTonya 862f6e9569 Posts/Post Types: Add filter to `is_post_type_viewable()`.
Introduces a new filter `'is_post_type_viewable'` which allows overriding the check. The expected filtered value is a boolean. As filtered values can change, including the data type, this commit includes a `is_bool()` check, thus ensuring backwards-compatibility.

Follow-up to [33666], [36402].

Props audrasjb, deepaklalwani, hellofromTonya, peterwilsoncc, powerbuoy, sergeybiryukov.
Fixes #49628.
Built from https://develop.svn.wordpress.org/trunk@52024


git-svn-id: http://core.svn.wordpress.org/trunk@51616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 23:01:58 +00:00
hellofromTonya c5662ee7a1 Bundled Theme: Add privacy policy link to Twenty Twenty footer.
If a privacy policy is set, its page is now linked in the footer.

Follow-up to [46271].

Props audrasjb, justinahinon, kapilpaul, ryelle, sabernhardt.
Fixes #53446.
Built from https://develop.svn.wordpress.org/trunk@52023


git-svn-id: http://core.svn.wordpress.org/trunk@51615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 22:29:01 +00:00
hellofromTonya d4c8830ae3 Bundled Theme: Ensure logo displays in Customizer previewer.
Fixes an issue with the logo not displaying the Customizer previewer when changing the site title or description.

Follow-up to [46271].

Props acosmin, boniu91, sabernhardt.
Fixes #51337.
Built from https://develop.svn.wordpress.org/trunk@52022


git-svn-id: http://core.svn.wordpress.org/trunk@51614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 22:20:58 +00:00
Clorith 44f50060eb Site Health: Add the constant `WP_ENVIRONMENT_TYPE` for debug data.
As a legacy from the old Health Check plugin, the constant `WP_LOCAL_DEV` was included in the debug data under the "WordPress Constants" section. This was incorrect, and has never been a constant used by core.

Instead, that field is now replaced by `WP_ENVIRONMENT_TYPE`, which was introduced with WordPress 5.5, and is a much more appropriate value to provide in a debug scenario.

Props johnbillion, bgoewert, sabbirshouvo.
Fixes #54340.
Built from https://develop.svn.wordpress.org/trunk@52021


git-svn-id: http://core.svn.wordpress.org/trunk@51613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 21:05:00 +00:00
Sergey Biryukov 0531cc11b4 Coding Standards: Consistently escape attribute in `wp-admin/themes.php`.
Follow-up to [27012], [38057], [47816], [51083].

Props sabbirshouvo, audrasjb.
Fixes #54256.
Built from https://develop.svn.wordpress.org/trunk@52020


git-svn-id: http://core.svn.wordpress.org/trunk@51612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 17:58:57 +00:00
hellofromTonya b9d15392bf Code Modernization: Pass correct default value to `http_build_query()` in `get_core_checksums()` and `wp_version_check()`.
The `get_core_checksums()` and `wp_version_check()` functions call the PHP native `http_build_query()` function, the second parameter of which is the ''optional'' `$numeric_prefix` parameter which expects a non-nullable `string`.

A parameter being optional, however, does not automatically make it nullable.

As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice.

In this case, this function call yielded a `http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated` notice.

Changing the `null` to an empty string fixes this without a backward compatibility break.

References:
* [https://www.php.net/manual/en/function.http-build-query.php PHP Manual: http_build_query()]
* [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC: Deprecate passing null to non-nullable arguments of internal functions]

Follow-up to [18697], [25540].

Props bjorsch, kraftbj, hellofromTonya, jrf.
See #54229.
Built from https://develop.svn.wordpress.org/trunk@52019


git-svn-id: http://core.svn.wordpress.org/trunk@51611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 12:18:58 +00:00
Clorith 500da91f70 Site Health: Update the icon used when no issues are reported.
The icon used to be a rather blocky checkmark, but has now been changed to the more friendly, and less ambiguous, smiley dashicon.

It also helps cover a rare cases where a checkmark, while often used to mark something as done, may also be used to indicate that something is incorrect (many thanks to my 6th grade teacher for this rationale).

As an added bonus, this commit also adjusts the margins used around the icon, to make it fit more nicely on both large and small viewports.

Props sabernhardt, generosus.
Fixes #53980.
Built from https://develop.svn.wordpress.org/trunk@52018


git-svn-id: http://core.svn.wordpress.org/trunk@51610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 11:41:01 +00:00
TimothyBlynJacobs fa473014dc REST API: Support subdirectory themes in the Themes controller.
This allows for themes that are included inside of a subdirectory, for example `subdir/my-theme`, to be accessed via the single item route of the `/wp/v2/themes` controller.

Fixes #54349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 02:30:57 +00:00
TimothyBlynJacobs 04a853195b REST API: Allow sidebars and their widgets to be public.
By default, only users with the `edit_theme_options` capability can access the sidebars and widgets REST API endpoints. In this commit, A new `show_in_rest` parameter is added to the `register_sidebar` function. When enabled, all users will be able to access that sidebar and any widgets belonging to that sidebar.

This commit reduces the `context` for a widget's `instance` information to only `edit`. This is to ensure that internal widget data is not inadvertently exposed to the public. A future ticket may expose additional APIs to allow widget authors to indicate that their instance data can be safely exposed. REST API consumers intending to access this `instance` information should take care to explicitly set the `context` parameter to `edit`.

Props spacedmonkey, zieladam.
Fixes #53915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 02:15:59 +00:00
Peter Wilson cae71f232c Comments: Avoid reparenting during post deletion.
Delete comments in a descending order by comment ID when deleting a post.

This avoids the expense of additional database queries required to re-parent threaded comments that are themselves about to be deleted.

Props Mte90, andraganescu, johnbillion, hellofromTonya, peterwilsoncc.
Fixes #37703.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 23:56:58 +00:00
hellofromTonya 9036739acc Administration: Make dashboard widget control submit button text more clear.
Changes the submit button text from "Submit" to "Save Changes".

Why? The text is more semantic and clear of what happens when activating that button.

Follow-up to [9103].

Props zodiac1978, knutsp, hilayt24, audrasjb.
Fixes #54229.
Built from https://develop.svn.wordpress.org/trunk@52014


git-svn-id: http://core.svn.wordpress.org/trunk@51605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 23:30:58 +00:00
hellofromTonya fcf096f4b9 Bundled Themes: Remove the "role" attribute on HTML elements with a default landmark role.
With IE11 no longer supported, the primary problem with assistive technology support for native HTML5 elements no longer applies.

This commit removes the `role` attribute from the following HTML5 elements with default landmark roles, per formerly required role attributes and W3C.

Follow-up to [17669], [21261], [23452], [24832], [29892], [38833], [40851], [43842], [46271], [49216].

Props costdev, craigfrancis, joedolson, mukesh27, ryokuhi, sabernhardt.
Fixes #54079.
Built from https://develop.svn.wordpress.org/trunk@52013


git-svn-id: http://core.svn.wordpress.org/trunk@51604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 18:18:01 +00:00
gziolo e4da863a6f Docs: Clarify the path usage register_block_type_from_metadata
The filename passed with the first param must end with `block.json`.

Fixes #53806.
Props coreyw, costdev.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 16:03:57 +00:00
gziolo 56e4bf827d Build: Remove polyfills from block view scripts
Related changes in Gutenberg: https://github.com/WordPress/gutenberg/pull/35038.

When adding a block with a view.js script, the frontend loads an additional ~20kb of scripts that were previously not there. These are coming from polyfills that are defined as a dependency for view.js scripts.
Since WordPress dropped support for IE, these polyfills are no longer needed and can be removed.

Follow-up to [51501].
See #53690.
Props aristath.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 15:57:58 +00:00
hellofromTonya 507cc58f72 Coding Standards: Add visibility to methods in `tests/phpunit/tests/`.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a `private` visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a `_` prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.
Built from https://develop.svn.wordpress.org/trunk@52010


git-svn-id: http://core.svn.wordpress.org/trunk@51601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 15:23:59 +00:00
hellofromTonya ce599b652a Coding Standards: Add `public` visibility to methods in `tests/phpunit/includes/`.
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword.

Why `public`?

With no visibility previously declared, these methods are implicitly `public` and available for use. As these are part of the WordPress testing framework (for Core and extenders), changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf, hellofromTonya.
See #54177.
Built from https://develop.svn.wordpress.org/trunk@52009


git-svn-id: http://core.svn.wordpress.org/trunk@51600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 13:16:57 +00:00
hellofromTonya 27d239d01b REST API: Improve translations, comments, and readability in URL Details endpoint.
Improvements:
* Removes HTML tags from translatable strings. Uses `sprintf` with placeholder and translators comment.
* Spells out "OG" to "Open Graph" to help translators.
* Adds `@since` param to new filters.
* Improves comments for code standards and consistency.
* Improves readability by making multiple args multiline.
* Micro-optimizations to avoid unnecessary variable assignments.

Follow-up to [51973].

Props hellofromTonya, sergeybiryukov, swissspidy.
Fixes #54358.
Built from https://develop.svn.wordpress.org/trunk@52008


git-svn-id: http://core.svn.wordpress.org/trunk@51599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 12:44:01 +00:00
davidbaumwald 2e249395de Comments: Add `noopener noreferrer` to author links in list table.
When viewing the listing of all comments, author links previously passed referrer information to untrusted URLs.  This change adds `noreferrer` to each author link, as well as `noopener` to prevent the passing of information about the parent window.

Props cybr, adam3128, erayalakese, andraganescu, audrasjb, joedolson, sabernhardt. 
Fixes #40916.
Built from https://develop.svn.wordpress.org/trunk@52007


git-svn-id: http://core.svn.wordpress.org/trunk@51596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 20:02:02 +00:00
Sergey Biryukov aa62c253e0 External Libraries: Update the Iris color picker to version 1.1.1.
The latest version includes jQuery 3.x deprecation fixes:
* `$.isArray` → `Array.isArray`
* Event attachment/trigger shorthands → `.on()` and `.trigger()`

For a full list of changes in this update, see the PR on GitHub:
https://github.com/Automattic/Iris/pull/72

Follow-up to [22030], [22033], [22385], [22457], [22697], [22732], [23443], [26334], [30551], [30650], [38931], [50547].

Props Clorith, mattwiebe, Cybr.
Fixes #54224.
Built from https://develop.svn.wordpress.org/trunk@52006


git-svn-id: http://core.svn.wordpress.org/trunk@51595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 19:40:00 +00:00
Sergey Biryukov 8117af8bb2 General: Remove the `svn:executable` property from `wp-admin/_index.php`.
The property appears to be added accidentally. The removing was mentioned but not included in the previous commit.

Follow-up to [38049], [42200], [46585], [51995], [52001].

See #54321.
Built from https://develop.svn.wordpress.org/trunk@52005


git-svn-id: http://core.svn.wordpress.org/trunk@51594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 17:23:56 +00:00
johnjamesjacoby 3e81de0a3d Themes/TwentySixteen: correct invalid CSS `font-style` value.
This change swaps out `none` for `normal` in the `.wp-block-pullquote cite` styling of `blocks.css`.

Props malae, mukesh27, sabernhardt.

Fixes #46807.
Built from https://develop.svn.wordpress.org/trunk@52004


git-svn-id: http://core.svn.wordpress.org/trunk@51593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 17:01:57 +00:00
hellofromTonya 6a10d18458 Customize: Fix `focus()` to collapse child panels and show parent panel.
When a child panel is open, `wp.customize.panel('parent_panel').focus()` (e.g. `'parent_parent'` might be `'nav_menus'`) collapses the child panel(s) to show the parent panel. 

Follow-up to [30102], [31920], [38648].

Props celloexpressions, costdev, dlh, hareesh-pillai, hellofromTonya, westonruter, wpweaver. 
Fixes #34436.
Built from https://develop.svn.wordpress.org/trunk@52003


git-svn-id: http://core.svn.wordpress.org/trunk@51592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 15:05:58 +00:00
desrosj e2315352e9 Build/Test Tools: Pass workflow outcome to Slack Notifications.
When using a workflow as a callable workflow, the job status check functions do not take the called workflow into account. This has caused some failures to be incorrectly reported as successful.

This adds an input to the Slack notifications workflow for when the `workflow_call` event is used.

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52002


git-svn-id: http://core.svn.wordpress.org/trunk@51591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 14:56:04 +00:00
Sergey Biryukov a59ade2290 Help/About: Improve typography in the `Welcome to your WordPress Dashboard!` text.
Per the general consensus in #8714 and similar tickets, user-facing strings should use “curly quotes” for better typography.

Remove the `svn:executable` property that appears to be added accidentally.

Follow-up to [38049], [42200], [46585], [51995].

See #54321.
Built from https://develop.svn.wordpress.org/trunk@52001


git-svn-id: http://core.svn.wordpress.org/trunk@51590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 03:16:57 +00:00
Sergey Biryukov 7effeb4fc1 Build/Test Tools: Restore the `https` URL for `browserify-aes`.
Follow-up to [51967], [51974].

See #54054.
Built from https://develop.svn.wordpress.org/trunk@52000


git-svn-id: http://core.svn.wordpress.org/trunk@51589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 03:00:57 +00:00
Sergey Biryukov 8ea16bd30e Tests: Clean up the `$_REQUEST` superglobal in `WP_UnitTestCase_Base::clean_up_global_scope()`.
This resolves an issue where setting up `$_REQUEST['post_type']` and not clearing it afterwards in `Tests_Admin_IncludesScreen::setup_block_editor_test()` started affecting a few `WP_Comments_List_Table` tests after [51997]. It also ensures a similar issue does not inadvertently happen in other tests.

Follow-up to [760/tests], [51997].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51999


git-svn-id: http://core.svn.wordpress.org/trunk@51588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 02:57:58 +00:00
Sergey Biryukov a949417a2e Tests: Correct `@covers` tags in `WP_Comments_List_Table` tests.
Follow-up to [51993], [51997].

See #39265.
Built from https://develop.svn.wordpress.org/trunk@51998


git-svn-id: http://core.svn.wordpress.org/trunk@51587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 00:55:56 +00:00
Sergey Biryukov 012f50f565 Tests: Split `WP_Posts_List_Table` and `WP_Comments_List_Table` tests into two separate files for clarity.
These were previously combined in the `includesListTable.php` file. Since the tests were specific neither to the `_get_list_table()` function nor the parent `WP_List_Table` class, the naming was confusing, which should now be resolved.

Follow-up to [31730], [38854], [40297], [48151], [48521], [49190], [51993].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51997


git-svn-id: http://core.svn.wordpress.org/trunk@51586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 00:49:58 +00:00
hellofromTonya b87617e271 Customizer: Make range controls full width.
Adds CSS for range controls in the Customizer to be as wide as possible allowing for smaller increments to be more easily obtained by the user.

Follow-up to [28930].

Props domainsupport, dlh, sabernhardt, audrasjb.
Fixes #54329.
Built from https://develop.svn.wordpress.org/trunk@51996


git-svn-id: http://core.svn.wordpress.org/trunk@51585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 23:19:59 +00:00
hellofromTonya 22e4a52258 Help/About: Improve the Welcome text in `wp-admin/_index.php`.
Improves the `Welcome to your WordPress Dashboard!` copy in the `Overview` section of the help tab.

Follow-up to [18914], [19007], [37680].

Props webcommsat, marybaum, costdev, audrasjb.
Fixes #54321.
Built from https://develop.svn.wordpress.org/trunk@51995


git-svn-id: http://core.svn.wordpress.org/trunk@51584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:54:59 +00:00
hellofromTonya 973f1f1cac Build/Test Tools: Add missing `@covers` and visibility for `Tests_Admin_includesMisc`.
Adds the `@covers` tag to the test DocBlock.
Adds missing `public` visibility to the test method.

Follow-up to [25002].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51994


git-svn-id: http://core.svn.wordpress.org/trunk@51583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:08:59 +00:00
hellofromTonya f45b359aa2 Build/Test Tools: Add missing `@covers` tags for `Tests_Admin_includesListTable`.
Follow-up to [31730].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51993


git-svn-id: http://core.svn.wordpress.org/trunk@51582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:01:59 +00:00
hellofromTonya 9869a44a0f Build/Test Tools: Add missing `@covers` tags for `Tests_Admin_includesFile`.
Follow-up to [25002], [42773].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51992


git-svn-id: http://core.svn.wordpress.org/trunk@51581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:57:57 +00:00
hellofromTonya 3819fa7340 Help/About: Simplifies WordPress version in "Help" sidebar.
Simplifies the logic for when not in alpha/beta/RC.

The changelog URL is translatable in a few other places in core. This commit uses the same pattern for consistency.

Follow-up to [51985].

Props sergeybiryukov.
Fixes #47848.
Built from https://develop.svn.wordpress.org/trunk@51991


git-svn-id: http://core.svn.wordpress.org/trunk@51580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:43:57 +00:00