Commit Graph

33602 Commits

Author SHA1 Message Date
audrasjb
350f7bb46e General: Revert [54225].
The My Site screen is not documented on HelpHub yet, so let's re-add the former Codex link for now.

Follow-up to [54225].

Props SergeyBiryukov.
Unprops audrasjb.
See #48987.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 08:19:10 +00:00
Peter Wilson
e241ac664a Posts, Post types: Prevent get_sample_permalink() modifying the post object.
`get_sample_permalink()` (ab)uses the `$post->filter` property to indicate a sample permalink is being generated for the post. This change ensures the property is restored to its original value.

Props herregroen, hellofromTonya, peterwilsoncc, Rahmohn, costdev.
Fixes #54736.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 04:31:09 +00:00
joedolson
ee24b9b733 Media: Change alt attribute field to textarea in media library.
Change the input field used for `alt` attributes in the media library views from a text input to a textarea. This gives users more flexibility in resizing the field for easier management of longer alt attributes. 

This patch includes a less-common use of `esc_attr` for a `textarea`. This is because the primary usage of the `alt` attribute will be escaped using `esc_attr`, and the value in editing should match the value output on the front end.

Props edent, sabernhardt, afercia, JavierCasares, audrasjb, joedolson.
Fixes #50066.
Built from https://develop.svn.wordpress.org/trunk@54243


git-svn-id: http://core.svn.wordpress.org/trunk@53802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 04:02:10 +00:00
Peter Wilson
8731d43633 Posts, Post types: Coding standards fixes following [54234].
Props costdev.
See #36905.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 03:58:09 +00:00
desrosj
a16bec07f2 General: Throw a more descriptive error when templates are not found.
When `wp.template()` is called in JavaScript for a template element that does not exist, a very nondescript error message is currently returned (“Uncaught TypeError: Cannot read property `replace` of `undefined`”).

This updates adds a check for this scenario and a new “Template not found” error is now thrown instead.

Props joehoyle, noisysocks, hilayt24.
Fixes #36631.
Built from https://develop.svn.wordpress.org/trunk@54241


git-svn-id: http://core.svn.wordpress.org/trunk@53800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 03:52:10 +00:00
desrosj
7d87ce12c8 Networks and Sites: Officially remove global terms.
Global terms was a feature from the WordPress MU days where multisite and single site installs used different code bases.

In WordPress 3.0, WordPress MU was merged into one location and the UI [14854] and “on” switch [14880] for global terms were completely removed.

Even before this merge, global terms was bug infested and unreliable. After [14854]/[14880], the feature was no longer maintained and became increasingly broken as taxonomies progressed without it (term splitting and term meta do not work at all). At this point, the feature has not worked in 12+ years and there’s no hope for saving it.

This deprecates the remaining global terms related code and no-ops the functions.

Global terms, you don’t have to go home, but you can’t stay here.

Props scribu, wonderboymusic, SergeyBiryukov, nacin, pento, desrosj, johnjamesjacoby, johnbillion, dd32.
Fixes #21734.
Built from https://develop.svn.wordpress.org/trunk@54240


git-svn-id: http://core.svn.wordpress.org/trunk@53799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 02:51:09 +00:00
desrosj
0cac41db2e Bootstrap/Load: Confirm the value of WP_ENVIRONMENT_TYPE before using.
This adjusts the check for the presence of the `WP_ENVIRONMENT_TYPE` constant to also confirm it is set to a non-empty value before using.

Props dd32, khokansardar, ramon-fincken.
Fixes #55741.
Built from https://develop.svn.wordpress.org/trunk@54239


git-svn-id: http://core.svn.wordpress.org/trunk@53798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 02:24:12 +00:00
desrosj
510047a552 Coding Standards: Applying an alignment fix from running composer format.
Follow up to [54214].

See #56467.
Built from https://develop.svn.wordpress.org/trunk@54238


git-svn-id: http://core.svn.wordpress.org/trunk@53797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:42:10 +00:00
Sergey Biryukov
0a4909f027 Date/Time: Minor tweak to support deprecated timezones on General Settings screen.
Underneath the timezone selector on the General Settings screen, a small snippet of info about the selected time zone is displayed.

This information would be missing if the timezone is set to a deprecated timezone value, even though PHP is perfectly capable of generating that information, including for deprecated timezones.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the condition from failing when the current timezone is a deprecated one.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Note: As this is an admin/output page, no pre-existing tests are available.

Follow-up to [54207], [54217], [54227], [54229], [54230], [54232], [54233].

Props jrf, costdev, marcyoast.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54237


git-svn-id: http://core.svn.wordpress.org/trunk@53796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:39:10 +00:00
desrosj
5bcb080993 Themes: Import Twenty Twenty-Three is now the default theme.
Follow up to [54235].

See #56383.
Built from https://develop.svn.wordpress.org/trunk@54236


git-svn-id: http://core.svn.wordpress.org/trunk@53795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:36:09 +00:00
desrosj
add7561ddc Bundled Themes: Import Twenty Twenty-Three, the new default theme for WordPress 6.1.
Twenty Twenty-Three is a stripped-back, minimal version of Twenty Twenty-Two that includes a collection of 10 distinct style variations designed and submitted by members of the WordPress community.

This unique approach to creating a default theme harnesses all of the flexibility that full site editing has to offer.

Everybody loves you when you’re twenty-three. What’s my age again?

Props amjadr360, anariel-design, audrasjb, beafialho, bgardner, colorful-tones, critterverse, daisyo, desrosj, dianeco, greenshady, joen, jffng, kafleg, kishanjasani, kraftbj, luminuu, madhudollu, mikachan, mtias, onemaggie, pbking , poena, richtabor, scruffian, soean, tanvirul, thelovekesh.
See #56383.
Built from https://develop.svn.wordpress.org/trunk@54235


git-svn-id: http://core.svn.wordpress.org/trunk@53794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:22:10 +00:00
Peter Wilson
4f748ac3fa Posts, Post types: Cache get_page_by_title().
Convert `get_page_by_title()` to a `WP_Query` wrapper to take advantage of the object caching built in to the latter.

Add dedicated unit tests for the function `get_page_by_title()`.

Props spacedmonkey, boonebgorges, igmoweb, pcfreak30, pbearne.
Fixes #36905.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:15:11 +00:00
Sergey Biryukov
526dba25c2 Date/Time: Correct timezone dropdown list creation in wp_timezone_choice().
This fixes a bug where if the `timezone_string` is set to a timezone name which has since been deprecated, no option would be (pre-)selected in the generated dropdown list and when the form using the dropdown list is submitted, the “old”, originally saved value would be lost as the form would submit without a value being selected for the `timezone_string` field.

The fix is a little hacky: it basically checks ahead of generating the actual dropdown list whether the `$selected_zone` value would be recognized and set to “selected” and if not, verifies that the value ''is'' a valid but outdated timezone name and if so, adds an extra dropdown entry to the top of the list with the original value and sets this value to “selected”.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Note: There are no pre-existing tests at all for this method and adding a complete set of tests for this method is outside the scope of this ticket, so this fix does not contain any tests.

Follow-up to [54207], [54217], [54227], [54229], [54230], [54232].

Props jrf, costdev, marcyoast.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54233


git-svn-id: http://core.svn.wordpress.org/trunk@53792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 01:02:10 +00:00
Sergey Biryukov
3d18a0c264 Date/Time: Correct sanitization of localized default timezone_string in populate_options().
This fixes a bug where if the default `timezone_string` is set to a deprecated timezone name due to a localization providing an outdated timezone name string, this localized timezone string would be discarded and an empty string would be set as the timezone value instead.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the invalidation of the option value.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Includes:
* Expanding the translators comment to encourage translators to use “old” names over “new” names.
* Adding a dedicated test to the `Tests_Admin_IncludesSchema` test class.

Follow-up to [54207], [54217], [54227], [54229], [54230].

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54232


git-svn-id: http://core.svn.wordpress.org/trunk@53791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 00:43:09 +00:00
davidbaumwald
a8cbd8c3da Upgrade/Install: Use "placeholder" for example values in setup-config.php.
During install, the user is prompted for database connection settings.  Inputs for the database name, username, and password will most likely be changed from the examples given, but these example values are presented as the input's `value` property.  This required the user to clear the current value before entering their own.

This change moves the example values for these fields to the `placeholder` property.

Props oliverstapelfeldt, audrasjb, krupalpanchal, sabernhardt.
Fixes #56365.
Built from https://develop.svn.wordpress.org/trunk@54231


git-svn-id: http://core.svn.wordpress.org/trunk@53790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 23:55:09 +00:00
Sergey Biryukov
aa6972c247 Tests: Add tests with deprecated timezone strings.
This commit adds tests in select places to ensure that these date/time related functions continue to behave as expected when the `timezone_string` option is set to an outdated/deprecated timezone name.

The timezone string used in these tests, `America/Buenos_Aires`, is a timezone string which was already deprecated in PHP 5.6.20 (the current minimum PHP version), so using this timezone string, we can safely test the handling of deprecated timezone names on all supported PHP versions.

See: [https://3v4l.org/Holsr#v5.6.20 timezone_identifiers_list() output for PHP 5.6.20].

Follow-up to [54207], [54217], [54227], [54229].

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54230


git-svn-id: http://core.svn.wordpress.org/trunk@53789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 23:53:09 +00:00
Sergey Biryukov
22e363e6c6 Date/Time: Correct sanitization of timezone_string in sanitize_option().
This fixes a bug where if the `timezone_string` is set to a timezone name which has since been deprecated, the option value would be “lost” when saving the value again, as the comparison being done to verify whether it is a valid timezone name would only take “current” timezone names into account and would invalidate deprecated timezone names.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the invalidation of the option value.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Includes adding a dedicated test to the data provider used in the `Tests_Option_SanitizeOption` test class.

Note: The new data set is ''named'', even though the other data sets are unnamed, to make sure it is clear what this data set is testing. Adding test names for the original data sets in this data provider would be a great future improvement, but is outside of the scope of this commit.

Follow-up to [18323], [33119], [54207], [54217], [54227].

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54229


git-svn-id: http://core.svn.wordpress.org/trunk@53788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 23:48:08 +00:00
joedolson
c5d200cb52 Media: Set https as placeholder for embedding media from URL.
Change the "Insert from URL" field in the media library to use a placeholder suggesting the `https://` protocol instead of a value attribute with `http://`.

Props Presskopp, adamsilverstein, joyously, thijso, joedolson, costdev.
Fixes #53404.
Built from https://develop.svn.wordpress.org/trunk@54228


git-svn-id: http://core.svn.wordpress.org/trunk@53787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 23:34:10 +00:00
Sergey Biryukov
af253aa544 I18N: Update list of continents and cities for the timezone selection.
Based on a two-way comparison between the available timezone city names in PHP 5.6.20 and PHP 8.2.0.

Lists of available timezone names have been retrieved using the PHP `timezone_identifiers_list()` function.

See: [https://3v4l.org/ro1vY/rfc#vgit.master timezone_identifiers_list() output and comparison].

Note: Both spellings of `Kiev`/`Kyiv` need to be in the list to allow it to work PHP cross-version.
* The “old” version — `Kiev` — will be used as the basis to find the localized name for the timezone dropdown lists on PHP 5.6 to 8.1.
* The corrected spelling — `Kyiv` — will be used to find the localized name on PHP 8.2 and up.

Follow-up to [50555], [54207], [54217].

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54227


git-svn-id: http://core.svn.wordpress.org/trunk@53786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 23:24:11 +00:00
davidbaumwald
5eb0223369 Media: Revert WebP generation.
Given [https://make.wordpress.org/core/2022/09/11/webp-in-core-for-6-1/ Matt's recent post about removing WebP from core] and possibly implementing the feature in a future [https://make.wordpress.org/core/2022/09/11/canonical-plugins-revisited/ "Canonical Plugin"], this change reverts changesets [54086], [54094], and [54097].  Additionally, [54210] contained a coding standards follow-up in one of the affected files that is no longer needed.

Reverts [54086], [54094], and [54097].

Props SergeyBiryukov.
See #55443.
Built from https://develop.svn.wordpress.org/trunk@54226


git-svn-id: http://core.svn.wordpress.org/trunk@53785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:53:10 +00:00
audrasjb
5ec680a5a1 General: Replace Codex links with their HelpHub counterparts - My Sites screen
Props chaton666.
See #48987.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:37:10 +00:00
Sergey Biryukov
d34882e9e6 Docs: Correct the wording in wp_lostpassword_url() description.
This affects:
* The `wp_lostpassword_url()` function.
* The `lost_password_html_link` filter.

The filter description was copied from the function, which appears to be not quite accurate, as the lost password can only be reset, not retrieved.

Follow-up to [11448], [54206].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@54224


git-svn-id: http://core.svn.wordpress.org/trunk@53783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:26:10 +00:00
Sergey Biryukov
7d0a24c29e Coding Standards: Move WP_List_Table::get_views_links() to a more appropriate place.
This moves the newly introduced `::get_views_links()` method to a more predictable location, next to the the `::get_views()` and `::views()` methods.

Follow-up to [54215].

See #42066.
Built from https://develop.svn.wordpress.org/trunk@54223


git-svn-id: http://core.svn.wordpress.org/trunk@53782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:24:09 +00:00
Sergey Biryukov
6c48acbbd3 I18N: Remove <code> tags from translatable strings in WP_List_Table::get_views_links().
To simplify the strings and exclude any parts that don't require translation, the `<code>` tags wrapping a placeholder can be moved out of the string and added to the placeholder value.

Follow-up to [54215].

See #42066.
Built from https://develop.svn.wordpress.org/trunk@54222


git-svn-id: http://core.svn.wordpress.org/trunk@53781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:15:10 +00:00
audrasjb
4ebc3861ea Twenty Twenty-One: Add a missing HTML comment for Customizer notice control.
This brings consistency with other bundled themes, like Twenty Nineteen.

Props haritpanchal.
Fixes #55725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:07:11 +00:00
audrasjb
08d046c717 General: Ensure admin notices are properly displayed on Site Health layout.
This changeset adds some CSS tweaks to ensure admin notices like the "Automated update failed" notice don't break the layout of the Site Health and Privacy Settings screens.

Props johnjamesjacoby, costdev, Clorith, audrasjb, SergeyBiryukov, joedolson.
Fixes #54624.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:51:11 +00:00
davidbaumwald
0c20fb1ad8 Help/About: Make translator comments version agnostic and make version translatable on the About page.
In past versions of the About page, translator comments referencing the Field Guide and Release Notes links included the current version number.  This change updates these translator comments to remove a specific version number, which was not necessary.

This change also abstracts the version number out of the "Read the WordPress X.X Release Notes" string, making it translatable.

Props Presskopp, audrasjb, SergeyBiryukov, marybaum.
Fixes #54741.
Built from https://develop.svn.wordpress.org/trunk@54219


git-svn-id: http://core.svn.wordpress.org/trunk@53778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:43:10 +00:00
audrasjb
4bb6301eb9 General: Pass $action to nonce_life filter.
This changeset contextualizes the usage of `nonce_life` filter by passing the `$action` parameter. It allows to alterate the default lifespan of nonces on a case by case basis.

Props giuseppemazzapica, dwainm, DrewAPicture, jorbin, audrasjb, SergeyBiryukov, costdev, antonvlasenko.
Fixes #35188.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:36:10 +00:00
Sergey Biryukov
8c7039e9c8 Tests: Replace the timezone used in date/time tests.
The `Europe/Kiev` timezone has been deprecated in PHP 8.2 and replaced with `Europe/Kyiv`.

The tests updated in this commit are testing the WordPress date/time functionality. They are **not** testing whether WP or PHP can handle deprecated timezone names correctly.

To ensure the tests follow the original purpose, the use of `Europe/Kiev` within these tests is now replaced with the `Europe/Helsinki` timezone, which is within the same timezone as `Europe/Kyiv`. This should ensure that these tests run without issue and test what they are supposed to be testing on every supported PHP version (unless at some point in the future `Europe/Helsinki` would be renamed, but that's a bridge to cross if and when).

Note: Separate tests should/will be added to ensure that relevant date/time related functions handle a deprecated timezone correctly, but that is not something ''these'' tests are supposed to be testing.

Follow-up to [45853], [45856], [45876], [45882], [45887], [45908], [45914], [46577], [46154], [46580], [46864], [46974], [54207].

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54217


git-svn-id: http://core.svn.wordpress.org/trunk@53776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:20:09 +00:00
joedolson
43e32ffa5c Editor: Fix text zoom on link popup editor.
Update CSS in the classic visual editor link popup to remove sizing in pixels that caused significant text overlaps when the base font size is scaled or set to a larger custom value in the browser or operating system.

Props jonny-s, sabernhardt, joedolson.
Fixes #53174.
Built from https://develop.svn.wordpress.org/trunk@54216


git-svn-id: http://core.svn.wordpress.org/trunk@53775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:18:09 +00:00
davidbaumwald
be9b533e13 Administration: Add new get_views_links method to WP_List_Table.
Many `WP_List_Table` child classes in core use mostly the same code to create their "view" links markup.  To DRY-up the code, a new `WP_List_Table->get_view_links` method is being introduced to consolidate the HTML link generation when provided an array of links.

This change also implements this new method in the relevant `WP_List_Table_xxx` child classes `get_views` methods.  Finally, unit tests are being added to validate view links markup and test for some "unhappy paths".

Props afercia, costdev, garrett-eclipse, Dharm1025, juhise, peterwilsoncc.
Fixes #42066.
Built from https://develop.svn.wordpress.org/trunk@54215


git-svn-id: http://core.svn.wordpress.org/trunk@53774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 21:08:10 +00:00
audrasjb
130e13e39e Editor: Backport block supports filter callback, registrations and tests to 6.1.
This changeset backports the following changes:

- Implement [https://github.com/WordPress/gutenberg/pull/42880 gutenberg#42880]: Backport script loader: enqueue stored block supports styles
- Allow a way to bypass `SCRIPT_DEBUG` in tests. See [https://github.com/WordPress/wordpress-develop/pull/3259#issuecomment-1250403735 comment] and the related [https://github.com/WordPress/gutenberg/pull/44248 Gutenberg pull request]

Props ramonopoly, gziolo, bernhard-reiter, audrasjb, costdev.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 20:56:10 +00:00
davidbaumwald
89213a3e4e Role/Capability: Add a new update_role function.
Until now, changing a user's role involved deleting a user's role then re-adding.  This change creates a new `update_role` function and associated method in `WP_Roles` to consolidate this process.

This commit also introduces new unit tests around `update_role` and adds additional "unhappy path" tests for roles and capabilities in general.

Props maksimkuzmin, peterwilsoncc, NomNom99, costdev, SergeyBiryukov.
Fixes #54572.
Built from https://develop.svn.wordpress.org/trunk@54213


git-svn-id: http://core.svn.wordpress.org/trunk@53772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 20:49:10 +00:00
davidbaumwald
5358008d68 Upgrade/Install: Add plugin URL to the automatic update email.
For each automatic plugin update, both successful and failed, information about each plugin is included in the email upon completion of the process.  This change adds the plugin URL, if known, to the information included for each plugin that was processed.

This change also adds unit tests to validate the email contents after various automatic plugin update scenarios.

Props JosVelasco, pbiron, oliverstapelfeldt, ChrisHardie, Ipstenu, dd32, peterwilsoncc, audrasjb, costdev.
Fixes #53049.
Built from https://develop.svn.wordpress.org/trunk@54212


git-svn-id: http://core.svn.wordpress.org/trunk@53771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 20:28:11 +00:00
audrasjb
3639a578ef Editor: Backport block supports (border, color, elements, spacing) from Gutenberg to WP 6.1.
This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [https://github.com/WordPress/gutenberg/pull/43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 20:14:10 +00:00
desrosj
1966addc05 Coding Standards: Various alignment fixes from composer format.
Follow up to [53874], [54097], [54110], [54155], [54162], [54184].

See #39210, #55443, #56288, #56092, #56408, #56467, #55881.
Built from https://develop.svn.wordpress.org/trunk@54210


git-svn-id: http://core.svn.wordpress.org/trunk@53769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 19:51:09 +00:00
desrosj
0fe6115af2 External Libraries: Update the jQuery UI library to version 1.13.2.
This is a bug fix release. For more information on the changes included, see https://jqueryui.com/changelog/1.13.2/.

Props Clorith, monolithon, desrosj.
Fixes #56239.
Built from https://develop.svn.wordpress.org/trunk@54209


git-svn-id: http://core.svn.wordpress.org/trunk@53768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 18:04:09 +00:00
davidbaumwald
34cd38aa84 Posts, Post Types: Update new wp_post_class_taxonomies filter name for consistency.
In [54066], a new filter was added to alter the taxonomies for which class names are generated for a given post type.  At the time, the filter name was prefixed with `wp_`.

For consistency with filters of a similar type, this change updates the filter name to `post_class_taxonomies`.

Follow-up to [54066].

Props SergeyBiryukov.
See #37114.
Built from https://develop.svn.wordpress.org/trunk@54208


git-svn-id: http://core.svn.wordpress.org/trunk@53767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 17:54:11 +00:00
Sergey Biryukov
04f0d611f8 Tests: Reset timezone-related options if the tests change them.
The `options` table is not explicitly reset after each test or test class, so if an option is changed during a test, it should be reset to the default value ''after'' the test.

This commit does so for those tests which did not have such resetting in place yet, while one or more tests in the class ''do'' change the value of the `timezone_string` option.

Note: The test suite executes a `ROLLBACK` query after each test, which should reset the `options` table in theory, however that appears to not always be enough, as some timezone-related tests can fail in a complete test suite run, while not failing when run in isolation. This commit aims to improve stability of the tests.

Follow-up to [45857] / #45821.

Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54207


git-svn-id: http://core.svn.wordpress.org/trunk@53766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 17:45:09 +00:00
davidbaumwald
0da06515aa Login and Registration: Add a new filter for the lost password link.
On the login page, the "Register" link for new users has been filterable for some time.  This change adds the ability to filter the "Lost your password?" link as well.

Props wparslan, audrasjb, rafiahmedd, SergeyBiryukov, antonvlasenko, hellofromTonya.
Fixes #55388.
Built from https://develop.svn.wordpress.org/trunk@54206


git-svn-id: http://core.svn.wordpress.org/trunk@53765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 17:09:08 +00:00
Clorith
f277e8c168 Site Health: Improve the details provided by the REST API checks.
The descriptions provided whenever a REST API check failed lacked details that would help in troubleshooting any issues, most notably the actual REST API endpoint that was being tested.

Adding this vital piece of detail, along with a revamp of the error messages shown, where previously there was a risk that the markup of your website was included as an error message, improves the overall user experience, and gives more accurate details that can be looked when looking up how to fix or improve the behavior of the REST API.

Props dingo_d, shetheliving.
Fixes #54617.
Built from https://develop.svn.wordpress.org/trunk@54205


git-svn-id: http://core.svn.wordpress.org/trunk@53764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 15:30:09 +00:00
hellofromTonya
94ae52c079 Editor: Fix function name case in wp_default_packages_inline_scripts().
Fixes function name typo by changing from uppercase `get_current_user_ID()` to lowercase `get_current_user_id()`.

>Note: Function names are case-insensitive for the ASCII characters A to Z, though it is usually good form to call functions as they appear in their declaration.
[https://www.php.net/manual/en/functions.user-defined.php As per the PHP manual], PHP functions are case-insensitive, meaning the code runs. However, this fix is necessary for consistency, maintainability, and future-proofing.

Follow-up to [54182].

Unprop hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54204


git-svn-id: http://core.svn.wordpress.org/trunk@53763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 14:20:09 +00:00
Sergey Biryukov
93bc199337 Tests: Simplify the data provider for testing whether KSES globals are defined.
To avoid duplicating array values as keys when using a named data provider, the `text_array_to_dataprovider()` helper method can be used.

Follow-up to [52229], [53521].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54203


git-svn-id: http://core.svn.wordpress.org/trunk@53762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 14:18:09 +00:00
desrosj
9913822661 External Libraries: Update the jQuery library to version 3.6.1.
This is a maintenance release. For more information on the changs included, see https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/.

Props tobiasbg.
See #56451.
Built from https://develop.svn.wordpress.org/trunk@54202


git-svn-id: http://core.svn.wordpress.org/trunk@53761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 14:16:24 +00:00
audrasjb
2fda7d7d1a Coding Standards: Replace double quote with single quote in test_if_failed_update().
Follow-up to [54200].
See #55758.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 09:16:11 +00:00
audrasjb
7b14bdbec0 Text Changes: Remove self-reference ("we") in WordPress Admin.
This changes some admin-area, user-facing text, to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word “we” should be avoided (...) unless its made very clear which group is speaking

Follow-up to [51979], [53131], [53132], [53148], [53156].

Props kebbet, costdev, SergeyBiryukov.
Fixes #55758.
See #46057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 08:59:11 +00:00
audrasjb
c279ba3edb Docs: Typo correction in _load_textdomain_just_in_time() docblock.
Props kebbet.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 08:44:10 +00:00
Sergey Biryukov
38e393f7d0 Tests: Move the basic get_block_templates() test to the dedicated file.
Now that the function has its own test class, the remaining test from `Tests_Block_Template_Utils` can be moved to `Tests_Blocks_GetBlockTemplates` for consistency.

Includes:
* Uncommenting some assertions previously commented out.
* Moving the `get_template_ids()` helper method to the top of the class.
* Standardizing on `wpSetUpBeforeClass()`/`wpTearDownAfterClass()` in both classes.
* Declaring the test theme name as a constant in both classes, since the value is not changed by any of the tests.
* Renaming some properties in both classes for clarity.

Follow-up to [51003], [52062], [53927], [54184], [54187].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54198


git-svn-id: http://core.svn.wordpress.org/trunk@53757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-18 13:10:09 +00:00
Clorith
e68db2692f Site Health: Adjust margins for the Site Health dashboard widget.
This aligns the spacing within the widget with other core widgets, and removes an unintended margin which was pushing the indicator slightly above the centered position it was intended to have.

Props sabernhardt, costdev, mukesh27.
Fixes #56369.
Built from https://develop.svn.wordpress.org/trunk@54197


git-svn-id: http://core.svn.wordpress.org/trunk@53756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-18 01:29:09 +00:00
Clorith
3c1cd858dd Site Health: Improve the description for Authorization header checks.
Previously the description left the user stuck with no path forward if flushing their permalinks was not enough.

This change givers a clearer description of what approving an application may involve (allowing these to connect to the users site), but also an additional step towards resolution if flushing permalinks are not enough; pointing them towards their host.

Props Presskopp, webcommsat.
Fixes #54508.
Built from https://develop.svn.wordpress.org/trunk@54196


git-svn-id: http://core.svn.wordpress.org/trunk@53755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-17 23:51:08 +00:00
Sergey Biryukov
4dd6f110a3 Docs: Revert the WP_Block_Parser documentation changes now.
This commit reverts [54193] and [54194].

It appears that these changes should first be made [533e0b7dad/packages/block-serialization-default-parser/parser.php upstream in the Gutenberg respository] and then backported to core, as the [https://github.com/WordPress/wordpress-develop/actions/runs/3074068296/jobs/4966609235#step:8:1 tests fail otherwise].

See #56581.
Built from https://develop.svn.wordpress.org/trunk@54195


git-svn-id: http://core.svn.wordpress.org/trunk@53754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-17 17:31:11 +00:00
Sergey Biryukov
e076ee2ee1 Docs: Correct @return type for WP_Block_Parser::parse().
This affects:
* `WP_Block_Parser::parse()`
* `WP_Block_Parser::$output`

Both the method and the property are documented as returning `WP_Block_Parser_Block[]` (an array of `WP_Block_Parser_Block` objects), but the result is in fact an array of arrays of various values, so `array[]` is the correct notation.

Follow-up to [43751] for the 5.0 branch, [44116] for trunk.

Props Chouby.
Fixes #56581.
Built from https://develop.svn.wordpress.org/trunk@54194


git-svn-id: http://core.svn.wordpress.org/trunk@53753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-17 17:13:11 +00:00
Sergey Biryukov
6435a4c9c7 Docs: Correct @since tags for some block parser properties and methods.
This affects:
* `WP_Block_Parser::$empty_attrs`
* `WP_Block_Parser::next_token()`
* `WP_Block_Parser::freeform()`
* `WP_Block_Parser_Block::$innerContent`

The `@since` tags referred to early Gutenberg versions instead of WordPress core. These properties and methods were introduced in WordPress 5.0, so `5.0.0` is the correct version.

Some of the other `@since` tags are removed, as they are related to early Gutenberg development before it was merged into WordPress core, and are not relevant for core.

Follow-up to [43751], [43884], [43955] for the 5.0 branch, [44116], [44261], [44281] for trunk.

Props Chouby.
See #56581.
Built from https://develop.svn.wordpress.org/trunk@54193


git-svn-id: http://core.svn.wordpress.org/trunk@53752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-17 16:49:09 +00:00
joedolson
b67e8e4dd9 Login and Registration: Required fields in network registration.
Properly label site and user information on the network registration screen with the HTML5 required attribute and clarify the values expected for the site domain and subdirectory fields.

Props SteelWagstaff, henrywright, sabernhardt.
Fixes #54344.
Built from https://develop.svn.wordpress.org/trunk@54192


git-svn-id: http://core.svn.wordpress.org/trunk@53751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-17 00:35:10 +00:00
joedolson
4ed6d8ad76 Login and Registration: Access improvements to network signup.
Fix a variety of accessibility issues with the network registration and activation screens. Fix associations between error messages and fields, improve labels for radio buttons, add fieldset and legend to properly group fields.

Props afercia, allisonplus, sabernhardt.
Fixes #40361.
Built from https://develop.svn.wordpress.org/trunk@54191


git-svn-id: http://core.svn.wordpress.org/trunk@53750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 23:13:10 +00:00
audrasjb
cad5069194 Docs: Update wp_rand docblock to clarify that it returns a non-negative number.
Props hakre, westi, jeremyfelt, neychok, sabernhardt, audrasjb.
Fixes #15089.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 22:39:11 +00:00
audrasjb
17480cc205 General: Replace Codex with HelpHub in WordPress readme.
This updates WordPress main `readme.txt` file to replace Codex link with HelpHub.

Props audrasjb, netweb, SergeyBiryukov, tobifjellner.
See #48987.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 22:27:10 +00:00
audrasjb
eafd18308b Code Modernization: Remove -webkit-appearance CSS declarations.
This changeset removes the deprecated `-webkit-appearance` CSS property used in `customizer-controls.css`. It doesn't change anything to the interface.

Props laurent22777, desrosj, celloexpressions, costdev, rolfsiebers, audrasjb, Clorith.
Fixes #38431.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 22:17:10 +00:00
Sergey Biryukov
8375b6e2eb Tests: Update the test for respecting the post type in get_block_templates().
* Use `assertSameSets()` to avoid a failure when array items are returned in different order ([https://github.com/WordPress/wordpress-develop/actions/runs/3067320461/jobs/4953478602#step:19:274 example]).
* Move the test to a more appropriate place now that the function has its own test class.
* Rename the test method to match the function name.

Follow-up to [52062], [53927], [54184].

See #55881.
Built from https://develop.svn.wordpress.org/trunk@54187


git-svn-id: http://core.svn.wordpress.org/trunk@53746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 15:12:09 +00:00
spacedmonkey
b01bafe003 Posts, Post Types: Improve performance of the get_user_data_from_wp_global_styles method.
Improve the logic found in `get_user_data_from_wp_global_styles` method. Replace call to `wp_get_recent_posts` with the more standard, `WP_Query` for consistancy. Use transient over standard cache, to improve performance on sites without persistent object caching. Improve handling of cases where `wp_insert_post` returns a `WP_Error`.

Props spacedmonkey, adamsilverstein, mukesh27, peterwilsoncc, andregal.
Fixes #55392.
Built from https://develop.svn.wordpress.org/trunk@54186


git-svn-id: http://core.svn.wordpress.org/trunk@53745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-16 10:57:14 +00:00
audrasjb
44569531b2 Code Modernization: Reduce CSS float usage in wp-admin - Timezone settings.
This changeset is a part of a task dedicated to improve wp-admin CSS code with less floating, as float never was intended for layout. The idea is to gradually replace floating methods that take the HTML element out of the normal flow of the document with more modern and robust positioning methods.

Props kebbet.
See #55557.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 22:59:11 +00:00
hellofromTonya
47d61a73ef Editor: Fix get_block_templates() to get templates for a post type.
When a post type is passed to `get_block_templates()` in the query, return only the templates that match that post type.

Fixes an issue where:
* when a block template provided by a theme has been edited by the user
* and that template has specific defined `postTypes`
* but after editing, the template was available for all post types.

Follow-up to [52062].

Props aljullu, bernhard-reiter, hellofromTonya.
Fixes #55881.
Built from https://develop.svn.wordpress.org/trunk@54184


git-svn-id: http://core.svn.wordpress.org/trunk@53743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 22:28:13 +00:00
Sergey Biryukov
335203e971 Editor: Finalize the theme_json_get_style_nodes hook name.
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [https://github.com/WordPress/wordpress-develop/pull/3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54183


git-svn-id: http://core.svn.wordpress.org/trunk@53742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 20:28:18 +00:00
hellofromTonya
8c85dde1c6 Editor: Persist preferences in user meta.
Adds a new feature to persist editor UI preferences between page loads and browsers.

* Adds a new preferences persistence API.
* Saves editor preferences in user meta instead of in browser's local storage.

Why?
Due to the transient nature of browser storage, this persistence is not as sticky as it is expected to be, including: switching browsers (unique storage between browsers), or using private browsing tabs (storage cleared between sessions), or the same user across a network of sites (storage unique by domain).

This is a backport from Gutenberg.[https://github.com/WordPress/gutenberg/pull/39795 See WordPress/gutenberg PR 39795].

Props talldanwp, youknowriad, noisysocks, mamaduka, costdev, ironprogrammer, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54182


git-svn-id: http://core.svn.wordpress.org/trunk@53741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 16:45:40 +00:00
Sergey Biryukov
21eb7900b3 Docs: Clarify the $allowed_protocols default value in various KSES functions.
Add a note that the parameter is optional and defaults to the result of `wp_allowed_protocols()`.

This affects:
* `wp_kses()`
* `filter_block_content()`
* `filter_block_kses()`
* `filter_block_kses_value()`

Includes synchronizing the `$allowed_html` parameter description for consistency.

Follow-up to [649], [6630], [18826], [32603], [43016], [46896], [48478].

Props armondal, SergeyBiryukov.
Fixes #56580.
Built from https://develop.svn.wordpress.org/trunk@54181


git-svn-id: http://core.svn.wordpress.org/trunk@53740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 13:29:13 +00:00
audrasjb
82c08816f6 Docs: Use third-person singular verbs in Template Loading functions descriptions, as per docblocks standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 12:49:08 +00:00
audrasjb
199454f6ae Docs: Clarify that get_page_template() doesn't work on block themes.
When working on a block theme, `locate_block_template()` should be used instead of `get_page_template()`. This changeset updates the docblock of this function accordingly.

Props audrasjb, costdev, robinwpdeveloper.
Fixes #56394.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 12:44:09 +00:00
Sergey Biryukov
3b0c68d032 Docs: Clarify documentation for the nav_menu_item_id filter.
This aims to make it clear that the filter is applied to an HTML ID attribute for the menu item's `<li>` element, and not a numeric ID.

Follow-up to [15407], [25410], [27201], [38559], [51739].

Props dilipbheda, robinwpdeveloper, mukesh27, audrasjb, SergeyBiryukov.
See #56574, #55646.
Built from https://develop.svn.wordpress.org/trunk@54178


git-svn-id: http://core.svn.wordpress.org/trunk@53737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 12:32:08 +00:00
audrasjb
57b47f0a09 Help/About: Remove .hidden class when the Help Tab panel is displayed.
It is obviously more logical and semantic to remove the `hidden` class when the panel is displayed. Plus, it prevents from weird behavior occurring when plugins also use the `hidden` class to hide stuff.

Props grabmedia, SergeyBiryukov, helen, sabernhardt, costdev, audrasjb.
Fixes #27697.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 12:29:12 +00:00
hellofromTonya
f3ff15edfc Themes: Introduces block-based template parts for Classic themes.
Allows Classic / Hybrid themes to use block-based template parts without using complete block-based templates.

* Exposes the Site Editor's template parts UI
* Adds Appearance > "Template Parts" menu
* Enabled within the theme via adding a theme support for `'block-template-parts'`
{{{#!php
add_theme_support( 'block-template-parts' );
}}}

This is a backport from Gutenberg.[https://github.com/WordPress/gutenberg/pull/42729 See WordPress/gutenberg PR 42729].

Follow-up to [52330], [52069], [52178].

Props mamaduka, fabiankaegy, poena, scruffian, manfcarlo, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54176


git-svn-id: http://core.svn.wordpress.org/trunk@53735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 12:20:09 +00:00
audrasjb
5ea7b42f89 Editor: Backport build_query_vars_from_query_block changes from Gutenberg repository.
This changeset backports changes from the following Gutenberg pull requests:

- [https://github.com/WordPress/gutenberg/pull/43590 gutenberg#43590] Add a filter to `build_query_vars_from_query_block`
- [https://github.com/WordPress/gutenberg/pull/40933 gutenberg#40933] Block Library - Query Loop: Add parents filter

Props ntsekouras, bernhard-reiter.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 11:41:10 +00:00
audrasjb
c72fae1c58 Editor: Backport wp_theme_element_class_name() alias.
This changeset backports the `wp_theme_element_class_name()` alias for the "internal" `WP_Theme_JSON::get_element_class_name()` function.

This is a backport of [https://github.com/WordPress/gutenberg/pull/44099 gutenberg/PR44099].

Note: this changeset doesn't replace calls to `WP_Theme_JSON::get_element_class_name` in the tests, since those are specifically for the `WP_Theme_JSON` class.

Props bernhard-reiter, cbravobernal, costdev.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 10:55:08 +00:00
audrasjb
81ada51ba4 Docs: Use third-person singular verbs in Media API function descriptions, as per docblocks standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 10:52:08 +00:00
audrasjb
83a2c2428a Docs: Add missing @since history in Gallery Shortcode function.
Props bengreeley, audrasjb, desrosj, mukesh27.
Fixes #56206.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 08:56:08 +00:00
audrasjb
11fdb19ae3 Twenty Nineteen: Define underline thickness for links.
This changeset adds `text-decoration-thickness: 2px;` to all underlined link to ensure that underline thickness stay consistent across browsers. This fixes an issue where the underline style on links using the Hoefler Text font was too thin in Firefox.

Props allancole, sabernhardt, danfarrow, audrasjb, neychok, multidots1896, maartenj.
Fixes #45925.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-15 08:35:18 +00:00
audrasjb
1efbea5145 Twenty Twenty-One: Remove WooCommerce related CSS selectors.
The selectors for Twenty Twenty-One's default `max-width` have used the `.woocommerce` class since the theme's [956a3172a4 (diff-b757cb999144a1bc7e14604bc6d4bab7d87ea1a3bf5000c33937e490d75b9d92R3-R9) initial commit]. This changeset removes all WooCommerce CSS selector from the theme, as they would need to be supported forever. The change was tested with WooCommerce installed and no issues were raised. 

Props sabernhardt, audrasjb, davidbaumwald, tahmidulkarim, mukesh27.
Fixes #56366.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 22:33:10 +00:00
Andrew Ozz
c9d23006db Site health:
- Add a check to `wp_check_php_version()` whether the current PHP version is lower than the next (desired) minimum version.
- Set the next desired minimum PHP version to 7.2.
- Use that check to update the warnings in the `wp_dashboard_php_nag()` widget, and on the Site Health screen.

Props Clorith, SergeyBiryukov, ironprogrammer, azaozz.
See #56199.
Built from https://develop.svn.wordpress.org/trunk@54169


git-svn-id: http://core.svn.wordpress.org/trunk@53728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 22:19:14 +00:00
audrasjb
e254c02be5 Twenty Twenty-Two: Add "Accessibility Ready" tag to theme in repository
A cross-team consensus has been reached to allow Twenty Twenty-Two to be tagged as "Accessibility Ready" on the WordPress Themes repository.

Props bph, kjellr, utz119, ryokuhi, joedolson, audrasjb, mikeschroder, poena, annezazu.
Fixes #55172.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 21:52:14 +00:00
audrasjb
6d5fca2685 Twenty Twenty: Fix Social Links widget alignment.
This fixes an alignment issue with the Social Links block used in the context of a widget area.

Props grandeljay, sabernhardt.
Fixes #56474.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 21:34:10 +00:00
audrasjb
ea0711255f Twenty Twenty: Ensure Latest Posts block set to 2 columns displays accordingly in the Editor.
This brings consistency between block editor and front-end rendering.

Props smit08, mukesh27, sabernhardt, multidots1896.
Fixes #56175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 21:19:10 +00:00
Andrew Ozz
136dc2b108 Site health: Add a menu bubble with the critical issues count to the Tools -> Site Health submenu.
Props: Clorith
See: #56199

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


git-svn-id: http://core.svn.wordpress.org/trunk@53724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 21:14:14 +00:00
audrasjb
ae532c8ef2 Twenty Twenty-One: Fix Heading Block alignment when nested in Cover Block.
This brings consistency between block editor and front-end rendering.

Props mrfoxtalbot, kajalgohel, harshvaishnav, audrasjb.
Fixes #56050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 20:51:16 +00:00
audrasjb
9ea8cc678c Twenty Twenty: Fix Heading Block alignment when nested in Cover Block.
This brings consistency between block editor and front-end rendering.

Props mrfoxtalbot, tahmidulkarim, NomNom99, audrasjb.
Fixes #56049.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 19:43:13 +00:00
hellofromTonya
bfcd054304 Editor: Backport foundation for Layout block support refactor (part 1).
Backports the following changes from the Gutenberg repository:

* [WordPress/gutenberg/40875 gutenberg/40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42087 gutenberg/42087] Theme.json: Add block support feature level selectors for blocks gutenberg/42087
* [WordPress/gutenberg/43792 gutenberg/43792] Global Styles: Split root layout rules into a different function gutenberg/43792
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42665 gutenberg/42665] Layout: Reduce specificity of fallback blockGap styles gutenberg/42665
* [WordPress/gutenberg/42085 gutenberg/42085] Core CSS support for root padding and alignfull blocks gutenberg/42085

Notes:
* It doesn't entirely port over PR 40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.
* [54159] was reverted in [54160] due to PHPUnit test failures for tests added by the commit. Later, tests passed when applied on top of `trunk`. There were various outages today of upstream `wp-env` dependencies, which likely were the root cause of the earlier failures. For historical tracking and to make sure, recommitting [54159] but instead on top of current `trunk`. See PR 3205 for more details.
* Giving additional props for those who did a deep dive investigation into the failed tests.

Follow-up to [54160], [54159].

Props andrewserong, aaronrobertshaw, isabel_brison, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54162


git-svn-id: http://core.svn.wordpress.org/trunk@53721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 18:44:09 +00:00
Sergey Biryukov
2c79eaf031 Feeds: Add a set of fine-grained filters to disable the different types of feed links separately.
The previously available set of filters in the `feed_links()` function to enable or disable display of various feed links was quite limited:
* `feed_links_show_posts_feed` to control the main feed
* `feed_links_show_comments_feed` to control both the global comments feed and the comment feed for singular posts.

In order to disable the other feeds (post type archive, category, tag, custom taxonomy, author archive, search results), one would have to unhook `feed_links_extra()` from `wp_head`, but that would completely remove all of those feeds, as well as the single post comments feed.

To allow for more flexibility, this commit introduces a full set of filters in the `feed_links_extra()` function to control each one of the feeds independently, including a way to enable/disable the single post comments feed when the global comments feed is disabled/enabled:

* `feed_links_extra_show_post_comments_feed`
* `feed_links_extra_show_post_type_archive_feed`
* `feed_links_extra_show_category_feed`
* `feed_links_extra_show_tag_feed`
* `feed_links_extra_show_tax_feed`
* `feed_links_extra_show_author_feed`
* `feed_links_extra_show_search_feed`

All of them default to `true`, except for `feed_links_extra_show_post_comments_feed` which defaults to the result of `feed_links_show_comments_feed` to ensure backward compatibility.

Follow-up to [33838], [33839], [53125].

Props lopo, mukesh27, audrasjb, SergeyBiryukov.
Fixes #55904.
Built from https://develop.svn.wordpress.org/trunk@54161


git-svn-id: http://core.svn.wordpress.org/trunk@53720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 17:14:10 +00:00
hellofromTonya
d5c8952218 Editor: Revert [54159].
Reverting changeset due to failing PHPUnit tests. Tests pass without changeset [54156], but fail with it. Reverting to explore why in the original PR after rebasing.

See #56467.
Built from https://develop.svn.wordpress.org/trunk@54160


git-svn-id: http://core.svn.wordpress.org/trunk@53719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 15:52:11 +00:00
audrasjb
c2ff10f1c1 Editor: Backport foundation for Layout block support refactor (part 1).
This change backports the following changes from Gutenberg repository:

- [WordPress/gutenberg#40875 gutenberg#40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42087 gutenberg#42087] Theme.json: Add block support feature level selectors for blocks gutenberg#42087
- [WordPress/gutenberg#43792 gutenberg#43792] Global Styles: Split root layout rules into a different function gutenberg#43792
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42665 gutenberg#42665] Layout: Reduce specificity of fallback blockGap styles gutenberg#42665
- [WordPress/gutenberg#42085 gutenberg#42085] Core CSS support for root padding and alignfull blocks gutenberg#42085

Note that it doesn't entirely port over PR40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.

Props andrewserong, aaronrobertshaw, isabel_brison.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 14:21:22 +00:00
gziolo
69040b7afe Code Quality: Remove unwanted spaces in the WP_Block_Type class
Follow-up [54155].
Props TobiasBg.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 13:53:13 +00:00
Sergey Biryukov
a2aa01cdac Docs: Correct @return value for wp_get_http_headers().
Following the update to replace the HTTP API internals with Requests library in WordPress 4.6, the return value of `wp_remote_retrieve_headers()` has changed from a simple array to an object which implements `ArrayAccess`.

Since `wp_get_http_headers()` directly returns the result of `wp_remote_retrieve_headers()`, its return value should reflect that change.

Includes:
* Updating the return value for the deprecated `wp_get_http()` function, which also directly returns the result of `wp_remote_retrieve_headers()`.
* Minor DocBlock formatting changes for some other HTTP API functions per the documentation standards.

Follow-up to [2416], [6390], [8092], [9013], [37428], [37989], [38730].

Props mhkuu.
See #54225, #55646.
Built from https://develop.svn.wordpress.org/trunk@54157


git-svn-id: http://core.svn.wordpress.org/trunk@53716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 13:08:14 +00:00
audrasjb
1e791f041d Editor: Backport Style Engine API functions, classes and tests.
This PR migrates the Style Engine PHP functions, classes and tests into Core for 6.1. It backports the original [WordPress/gutenberg#40260 PR #40260] from Gutenberg repository.

Props ramonopoly, bernhard-reiter, costdev, azaozz, andrewserong, mukesh27, aristath.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 12:48:16 +00:00
gziolo
714e57b2fc Blocks: Allow registering multiple items for all supported asset types
Follow-up #54337, [52069]. Part of https://github.com/WordPress/gutenberg/issues/41236. More details in https://github.com/WordPress/gutenberg/issues/33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 10:52:08 +00:00
audrasjb
1f47c2bcbf Twenty Twenty: Ensure headings styles are consistent between editor and front-end.
This changeset removes `.wp-block` container from headings CSS selectors to restore consistency between editor and front-end styles. It also removes `.wp-block` from headings selectors in the `'block-editor'` array of `twentytwenty_get_localized_font_family_elements()`.

Props kajalgohel, kmadhak, poena, multidots1896, tahmidulkarim, audrasjb.
Fixes #56194.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 10:48:11 +00:00
audrasjb
5499d60580 Twenty Twenty: Ensure link color is inherited from paragraph in the editor.
This changeset improves link colors consistency between front-end and the editor.

Props sabernhardt, webcommsat, audrasjb.
Fixes #56214.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 10:19:12 +00:00
audrasjb
b078199637 Twenty Twenty: Correctly align Social Icons block in the editor.
This changeset resets `padding-left` property for the Social Icons block in the editor.

Props umesh84, audrasjb, nidhidhandhukiya, kajalgohel.
Fixes #55987.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 10:04:10 +00:00
audrasjb
3eff1ca584 Twenty Fifteen: Ensure border-bottom styles are applied to the Button Block.
This issue was related to the `:where()` selector, which also affected Twenty Twenty (see #55824).

Props umesh84, sabernhardt.
Fixes #55006.
See #55824.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 09:31:12 +00:00
Sergey Biryukov
aa22aba0ba Upgrade/Install: Update sodium_compat to v1.18.0.
The latest version of sodium_compat includes some improvements, as well as a new feature which will also be included in PHP 8.2.

* Fixed issues with the PHP autoloader:
 * [https://github.com/paragonie/sodium_compat/pull/145 #145]: For WordPress, this ensures when Ed25519 is included, so too is the class it inherits from.
 * [https://github.com/paragonie/sodium_compat/issues/148 #148], [https://github.com/paragonie/sodium_compat/issues/149 #149]: For PHP 7.4+ with opcache preloading, this ensures the include guards don't fail.
* [https://github.com/paragonie/sodium_compat/pull/144 #144]: Added `sodium_crypto_stream_xchacha20_xor_ic()`
 * See [https://github.com/php/php-src/pull/8276 pull request for php-src] (merged in PHP 8.2)
 * For motivation: [https://github.com/paragonie/halite/issues/178 paragonie/halite#178]

Release notes:
https://github.com/paragonie/sodium_compat/releases/tag/v1.18.0

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

Follow-up to [49741], [51002], [51591], [52988].

Props jrf, paragoninitiativeenterprises.
Fixes #56564.
Built from https://develop.svn.wordpress.org/trunk@54150


git-svn-id: http://core.svn.wordpress.org/trunk@53709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 00:13:14 +00:00
audrasjb
7c01b0a340 Plugins: Visually align plugin cards in Plugin Install screen.
This changeset adds a flexible CSS columns layout to plugin cards in the Plugin Install screen, to ensure plugin cards all have the same height.

Props jamesckemp, audrasjb, joyously, sabernhardt, sharjeelkhanvmi, joyously.
Fixes #55721.
See #55272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-13 21:51:12 +00:00
Sergey Biryukov
30a13227bd Tests: Rename the test for wp_guess_url() to match the function name.
Includes adding `public` visibilty keyword for the data provider.

Follow-up to [54146].

See #36827.
Built from https://develop.svn.wordpress.org/trunk@54148


git-svn-id: http://core.svn.wordpress.org/trunk@53707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-13 20:40:11 +00:00
Sergey Biryukov
e9d2ae077c Tests: Rename the test for pre_option filter to match the filter name.
Move the method to a more appropriate place, next to the test for `default_option_*` filter.

Follow-up to [54145].

See #37930.
Built from https://develop.svn.wordpress.org/trunk@54147


git-svn-id: http://core.svn.wordpress.org/trunk@53706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-13 20:21:08 +00:00
davidbaumwald
1db23fca3f General: Correct path replacement regex in wp_guess_url.
In `wp_guess_url`, the regex to check for wp-login.php in the URL is slightly too permissive, not escaping `.` in "wp-login.php".  `.` is a token in regex that matches any character.

This change simply escapes the `.` and adds unit test coverage for `wp_guess_url`.

Props cfinke, ocean90, jrf, voldemortensen, jdgrimes, curdin, netweb, petitphp, SergeyBiryukov, costdev.
Fixes #36827.
Built from https://develop.svn.wordpress.org/trunk@54146


git-svn-id: http://core.svn.wordpress.org/trunk@53705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-13 19:50:12 +00:00