Commit Graph

46723 Commits

Author SHA1 Message Date
John Blackbourn 9b7f3ab827 Tag 6.1.6
Built from https://develop.svn.wordpress.org/tags/6.1.6@57977


git-svn-id: http://core.svn.wordpress.org/tags/6.1.6@57463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-09 20:10:50 +00:00
John Blackbourn fe8496f53f WordPress 6.1.6.
Built from https://develop.svn.wordpress.org/branches/6.1@57963


git-svn-id: http://core.svn.wordpress.org/branches/6.1@57457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-09 15:31:50 +00:00
John Blackbourn 8b33d35528 Editor: Update npm packages for the 6.1 branch.
Updates the editor npm packages to the latest patch versions.

Built from https://develop.svn.wordpress.org/branches/6.1@57953


git-svn-id: http://core.svn.wordpress.org/branches/6.1@57450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-09 15:16:53 +00:00
Joe McGill 0988ebb04b WordPress 6.1.5.
Built from https://develop.svn.wordpress.org/branches/6.1@57435


git-svn-id: http://core.svn.wordpress.org/branches/6.1@56941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-30 16:37:17 +00:00
Aaron Jorbin 693d656b6b Grouped Backports to the 6.1 branch
- Install: When populating options, maybe_serialize instead of always serialize.
- Uploads: Check for and verify ZIP archives.

Merges [57388] and [57389] to the 6.1 branch.

Props costdev, peterwilsoncc, azaozz, tykoted, johnbillion, desrosj, afragen, jorbin, xknown.

Built from https://develop.svn.wordpress.org/branches/6.1@57394


git-svn-id: http://core.svn.wordpress.org/branches/6.1@56900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-30 14:39:17 +00:00
audrasjb c0cd6360d9 WordPress 6.1.4.
Built from https://develop.svn.wordpress.org/branches/6.1@56893


git-svn-id: http://core.svn.wordpress.org/branches/6.1@56404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-12 18:40:32 +00:00
Joe McGill 9fa577589c Grouped backports to the 6.1 branch.
- REST API: Limit `search_columns` for users without `list_users`.
- Comments: Prevent users who can not see a post from seeing comments on it.
- Application Passwords: Prevent the use of some pseudo protocols in application passwords.
- Restrict media shortcode ajax to certain type
- REST API: Ensure no-cache headers are sent when methods are overriden.
- Prevent unintended behavior when certain objects are unserialized.

Merges [56833], [56834], [56835], [56836], [56837], and [56838] to the 6.1 branch.
Props xknown, jorbin, Vortfu, joehoyle, timothyblynjacobs, peterwilsoncc, ehtis, tykoted, martinkrcho, paulkevan, dd32, antpb, rmccue.

Built from https://develop.svn.wordpress.org/branches/6.1@56867


git-svn-id: http://core.svn.wordpress.org/branches/6.1@56378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-12 18:16:46 +00:00
desrosj 62123f1a58 WordPress 6.1.3.
Built from https://develop.svn.wordpress.org/branches/6.1@55834


git-svn-id: http://core.svn.wordpress.org/branches/6.1@55346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-20 04:14:38 +00:00
desrosj 5ad901e256 Editor: Restore shortcode support for block templates.
Follow up to [55761].

Props youknowriad, Clorith, desrosj, antpb, Otto42, johnbillion, jorbin, rmccue, timothyblynjacobs, mikeschroder, peterwilsoncc, audrasjb, matveb, noisysocks, xknown, ehtis, isabel_brison, talldanwp, gziolo, chriscct7, davidbaumwald.
Merges [55828] to the 6.1 branch.
See #58333.
Built from https://develop.svn.wordpress.org/branches/6.1@55830


git-svn-id: http://core.svn.wordpress.org/branches/6.1@55342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-20 04:05:34 +00:00
audrasjb 74d9f94ab4 Grouped backports to the 6.1 branch.
- Media: Prevent CSRF setting attachment thumbnails.
- Embeds: Add protocol validation for WordPress Embed code.
- I18N: Introduce sanitization function for locale.
- Editor: Ensure block comments are of a valid form.
- Editor: Remove shortcode support from block templates.

Merges [55760-55764] to the 6.1 branch.
Props dd32, isabel_brison, martinkrcho, matveb, ocean90, paulkevan, peterwilsoncc, timothyblynjacobs, xknown, youknowriad.


Built from https://develop.svn.wordpress.org/branches/6.1@55771


git-svn-id: http://core.svn.wordpress.org/branches/6.1@55283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-16 15:15:16 +00:00
desrosj db39c052a5 Build/Test Tools: Update several GitHub Actions.
This updates three GitHub Actions to their latest versions:
- `shivammathur/setup-php`
- `actions/cache`
- `wow-actions/welcome`

The welcome action now uses the `GITHUB_TOKEN` by default, so it no longer needs to be passed manually.

Merges [55487] to the 6.1 branch.
See #57572.
Built from https://develop.svn.wordpress.org/branches/6.1@55489


git-svn-id: http://core.svn.wordpress.org/branches/6.1@55022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-08 16:42:11 +00:00
desrosj 610800f948 Build/Test Tools: Update third-party `welcome` Action.
This updates the third-party action used to post a welcome message to pull requests opened by first time contributors.

This release updates the action to use Node.js version 16 instead of 12, the latter of which support has been deprecated for in GitHub Action runners.

The action has also changed from `bukboo/welcome-action` to `wow-action/welcome`.

Merges [54651] to the 6.1 branch.
See #56793.
Built from https://develop.svn.wordpress.org/branches/6.1@55488


git-svn-id: http://core.svn.wordpress.org/branches/6.1@55021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-08 16:40:16 +00:00
Sergey Biryukov f7599321dc Tests: Adjust the expected mime type for WOFF fonts on PHP 8.1.12+.
As of PHP 8.1.12, which includes libmagic/file update to version 5.42, the expected mime type for WOFF files has changed to `font/woff`, so the type needs to be adjusted accordingly in `wp_check_filetype_and_ext()` tests.

References:
* [https://github.com/php/php-src/issues/8805 php-src: #8805: finfo returns wrong mime type for woff/woff2 files]
* [https://www.php.net/ChangeLog-8.php#8.1.12 PHP 8.1.12 changelog]

Follow-up to [40124], [54508], [54509], [54724].

Props costdev, SergeyBiryukov.
Merges [55462] to the 6.1 branch.
Fixes #56817.
Built from https://develop.svn.wordpress.org/branches/6.1@55463


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-06 12:53:15 +00:00
Sergey Biryukov f11c958333 Media: Revert [55348] from the 6.1 branch.
This will be committed to trunk instead.

See #52569.
Built from https://develop.svn.wordpress.org/branches/6.1@55403


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 14:21:14 +00:00
Peter Wilson a222990fa4 I18N: Add new strings to `about.php` for use with end-of-life updates.
This changeset adds two additional translation strings in the changelog file, for use when releasing the final version of WordPress on a particular branch.

Props peterwilsoncc, audrasjb, mukesh27.
Merges [55350] to the 6.1 branch.
Fixes #57216.

Built from https://develop.svn.wordpress.org/branches/6.1@55371


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 02:36:15 +00:00
desrosj 29906b54cc Build/Test Tools: Backport updates to GitHub Actions.
This backports updates to GitHub Actions workflows required to address deprecated notices related to `save-output` and `set-output`.

Merges [54650], [54750], [54851], [54852], [54856], and [55152] to the 6.1 branch.
See #56882, #56820.
Built from https://develop.svn.wordpress.org/branches/6.1@55357


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 07:53:15 +00:00
antpb 25e8108b0a Media: Add `setImagickTimeLimit()` function to avoid timeout in Imagick operations.
Previously, Imagick operations could silently error by timeout and produce unexpected results. The new `setImagickTimeLimit()` function will better handle garbage collection in these cases as well as better align Imagick's timeout with PHP timeout, assuming it is set.

Props drzraf, audrasjb, costdev.
Fixes #52569.

Built from https://develop.svn.wordpress.org/branches/6.1@55348


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 21:32:16 +00:00
Peter Wilson 0ed99784d8 Built/Test tools, HTTP API: Refactor test for multiple location headers.
Remove wordpress.org as an external dependency testing `WP_HTTP::handle_redirects()`.

This refactors and reenables an existing test to call the `WP_HTTP::handle_redirects()` method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 6.1 branch.
Fixes #57306.
See #56793.


Built from https://develop.svn.wordpress.org/branches/6.1@54974


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-15 04:20:15 +00:00
desrosj ca42fa5300 Upgrade/Install: Remove bundled theme files from `$_old_files`.
Because themes are updated independently of Core updates, any deleted files from bundled themes should not be included in the `$_old_files` list.

Any file included in this list is deleted on update, which could cause problems for sites with a given theme active if the removed files were required in earlier versions of that theme and that theme is not updated at the same time.

Props desrosj, costdev, SergeyBiryukov.
Merges [54849] to the 6.1 branch.
Fixes #56936.
Built from https://develop.svn.wordpress.org/branches/6.1@54966


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-13 18:52:14 +00:00
Dominik Schilling 445ae3a765 Revert [54892] from the 6.1 branch.
This will be added again once committed to trunk first.

See #57163.

Built from https://develop.svn.wordpress.org/branches/6.1@54893


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 20:27:12 +00:00
Dominik Schilling 9db532d5ab Query: Account for primed post caches without primed post meta/term caches.
In [54352] `update_post_caches()` was replaced by `_prime_post_caches()` to reduce excessive object cache calls. That's because `_prime_post_caches()` checks first if post IDs aren't already cached. Unfortunately this becomes an issue if a post itself is cached but not the meta/terms.
To fix this regression, `_prime_post_caches()` now always calls `update_postmeta_cache()` and `update_object_term_cache()` depending on the arguments passed to it. Both functions internally check whether IDs are already cached so the fix from [54352] remains in place.

Props peterwilsoncc, spacedmonkey, ocean90.
Fixes #57163.
Built from https://develop.svn.wordpress.org/branches/6.1@54892


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 20:11:12 +00:00
Sergey Biryukov 9c9864efc3 Coding Standards: Correct the deprecation version for `_filter_query_attachment_filenames()`.
Follow-up to [54524].

Props jrf.
Merges [54878] to the 6.1 branch.
See #56791.
Built from https://develop.svn.wordpress.org/branches/6.1@54879


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 16:25:14 +00:00
desrosj bb06225ed7 Post WordPress 6.1.1 version bump.
The 6.1 branch is now `6.1.2-alpha`.
Built from https://develop.svn.wordpress.org/branches/6.1@54847


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 19:58:14 +00:00
desrosj 0e5fcd6b0b WordPress 6.1.1.
Built from https://develop.svn.wordpress.org/branches/6.1@54845


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 18:59:12 +00:00
desrosj db5f688eb1 Help/About: Use the correct comment for translators.
Follow up to [54843].

Unprops desrosj.
Props SergeyBiryukov.
See #57119.
Built from https://develop.svn.wordpress.org/branches/6.1@54844


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 18:50:12 +00:00
desrosj 6d319069b0 Help/About: Update the About page for 6.1.1.
Props jeffpaul.
Fixes #57119.
Built from https://develop.svn.wordpress.org/branches/6.1@54843


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 18:45:15 +00:00
desrosj 5041735c6b Upgrade/Install: Delete the `comments-query-loop` folder in `wp-includes/blocks`.
This properly deletes the now empty `src/wp-includes/blocks/comments-query-loop` directory and adds that directory to the `$_old_files` array.

The files in this directory were removed in [54257], but the directory was not marked as deleted in SVN.

Props azaozz, jorbin, SergeyBiryukov.
Merges [54836] to the 6.1 branch.
Fixes #57080.
Built from https://develop.svn.wordpress.org/branches/6.1@54837


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 18:33:12 +00:00
Sergey Biryukov 8e93232c37 Tests: Resolve `WP_Query` test failures on MariaDB due to indeterminate sort order.
[54768] added a few tests to verify that caching within `WP_Query` is bypassed when the `SELECT` clause has been modified via a filter, to avoid cache key collisions and the returning of incomplete or unexpected results.

However, creating several posts with the same date/time fields can result in inconsistent sort ordering between MySQL and MariaDB, as each engine refines the order further using a different index.

This commit aims to stabilize the tests by using `assertEqualSets()` instead of `assertEquals()`, since testing the order is out of their scope. Includes removing `array_unshift()` and `array_reverse()` calls as no longer needed.

This resolves a few test failures on MariaDB along the lines of:
{{{
Tests_Query_FieldsClause::test_should_limit_fields_to_id_and_parent_subset
Posts property for first query is not of expected form.
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => stdClass Object (
-        'ID' => 36019
+        'ID' => 36015
         'post_parent' => 0
     )
     1 => stdClass Object (
-        'ID' => 36018
+        'ID' => 36016
         'post_parent' => 0
     )
     2 => stdClass Object (...)
     3 => stdClass Object (
-        'ID' => 36016
+        'ID' => 36018
         'post_parent' => 0
     )
     4 => stdClass Object (
-        'ID' => 36015
+        'ID' => 36019
         'post_parent' => 0
     )
 )

/tmp/wp-test-runner/tests/phpunit/tests/query/fieldsClause.php:67
/tmp/wp-test-runner/phpunit-5.7.phar:598
}}}

Follow-up to [54768].

Props peterwilsoncc, SergeyBiryukov.
Merges [54829] to the 6.1 branch.
Fixes #57012.
Built from https://develop.svn.wordpress.org/branches/6.1@54830


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-12 15:27:14 +00:00
desrosj 410aedc35b Post WordPress 6.1.1 RC1 version bump.
Built from https://develop.svn.wordpress.org/branches/6.1@54828


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 18:41:11 +00:00
desrosj 4685bd0b15 WordPress 6.1.1 RC1.
Built from https://develop.svn.wordpress.org/branches/6.1@54827


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 18:21:13 +00:00
desrosj 63e2d9d0d7 Coding Standards: Apply spacing changes after `composer format`.
Follow up to [54817].

Merges [54824] to the 6.1 branch.
See #57057.
Built from https://develop.svn.wordpress.org/branches/6.1@54826


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:58:12 +00:00
desrosj 4a20d03fba Editor: Improve how `min`/`max` font sizes are calculated for fluid typography.
- Where no fluid max values are set (e.g., single or custom font size values), the "size" value will act as the maximum value in a `clamp()` function.
- In the absence of any fluid `min`/`max` values, the lower bound rule of `>16px` will be enforced. This applies to custom values from the editor or single-value `theme.json` styles. Font sizes below this will not be clamped.
- In a preset, if a `fluid.min` value has been specified, the lower bound rule of `>16px` won't be enforced on this value. Presets with a fluid object therefore, give precedence to theme author's values.
- In a preset, if there is NOT a `fluid.max` but there is `fluid.min`, use the incoming "size" value as the `max`.
- In a preset, if there is NOT a `fluid.min` but there is a `fluid.max`, use `size * min_size_factor` as the `min`. The lower bound rule of `>16px` is enforced here, because the block editor is computing the `min` value. This is consistent with the way minimum sizes are calculated for single or custom values.


Props ramonopoly, mamaduka, andrewserong, aristath, joen, desrosj.
Merges [54823] to the 6.1 branch.
Fixes #57075.
Built from https://develop.svn.wordpress.org/branches/6.1@54825


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:56:12 +00:00
desrosj 23546129a6 Editor: Correctly style separator blocks when only a `background-color` is defined.
When separator blocks are configured using only a `background-color`, they are shown correctly within the editor but not on the front end.

This changes `WP_Theme_JSON` to detect this scenario and move the `background-color` value to just `color` when both `color` and `border-color` are missing.

Props cbravobernal, flixos90, davidbaumwald, hellofromTonya, desrosj, andrewserong, czapla, glendaviesnz, wildworks.
Merges [54821] to the 6.1 branch.
Fixes #56903.
Built from https://develop.svn.wordpress.org/branches/6.1@54822


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:25:12 +00:00
desrosj 5a6761f54f Themes: Revert one instance of `wp_get_theme()` from [54817].
Since this specific call to `wp_get_theme()` is found within `wp-includes/blocks`, this change will need to be made upstream in the Gutenberg repository.

Merges [54819] to the 6.1 branch.
See #57057.
Built from https://develop.svn.wordpress.org/branches/6.1@54820


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:40:11 +00:00
desrosj 726dfff138 Themes: Reduce usage of `wp_get_theme` function.
Calling the `wp_get_theme` function creates a instance of the `WP_Theme` class. This can be a performance issue, if all you need is one property of the class instance. This change replaces the usage of `wp_get_theme()->get_stylesheet()` with `get_stylesheet()` to improve performance.

Props spacedmonkey, flixos90, peterwilsoncc, desrosj.
Merges [54817] to the 6.1 branch.
Fixes #57057.
Built from https://develop.svn.wordpress.org/branches/6.1@54818


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:31:14 +00:00
desrosj f02ff374b2 Filesystem: Return FTP/FTP Sockets `exists()` methods to a previous state.
This partially reverts [53860] and [53862], which refactored the `exists()` method to rely on `ftp_rawlist()` instead of `ftp_nlist()`.

[53860] makes a similar attempt to the ones made in [33648] and [34733] (which were also reverted in [35944]). Being compliant with the specifications while continuing to work without issue for all FTP servers continues seem impossible. These little ghosts are the ones we’re scared of the most.

Props jsh4, afragen, costdev, pkolenbr, SergeyBiryukov, dd32, peterwilsoncc, gamecreature, desrosj.
Merges [54815] to the 6.1 branch.
Fixes #56966.
See #51170, #28013.
Built from https://develop.svn.wordpress.org/branches/6.1@54816


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:04:12 +00:00
Sergey Biryukov 8dadc6bb25 Formatting: Check that both `normalizer_*` functions exist in `remove_accents()`.
This applies to:
* `normalizer_is_normalized()`
* `normalizer_normalize()`

Includes removing the `Normalizer::FORM_C` constant as a parameter, since it is the default value for both functions and does not need to be explicitly passed. This avoids a fatal error if a plugin includes polyfill for any of the functions but the `Normalizer` class has a different namespace, for example when using the Symfony polyfill.

Follow-up to [53754].

Props hellofromTonya, costdev, desrosj, mukesh27, zodiac1978, jchambo, gisgeo, SergeyBiryukov.
Merges [54813] to the 6.1 branch.
Fixes #56980.
Built from https://develop.svn.wordpress.org/branches/6.1@54814


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 15:31:14 +00:00
desrosj 44981a9b9c Editor: Update block editor packages to the latest patch releases.
This updates the block editor related npm dependencies to their latest patch versions ahead of WordPress 6.1.1.

For a full list of what’s included in this update, see 432ed388f8...6566f5fe9e.

Props aaronrobertshaw, ntsekouras, bernhard-reiter, ramonopoly, isabel_brison, andrewserong, get_dave, scruffian, andraganescu, talldanwp, mciampini, noisysocks, cbravobernal, bph, tyxla, ellatrix, czapla, mcsf, ironprogrammer, wildworks, peterwilsoncc, mamaduka, mikachan, spacedmonkey, cybr, youknowriad, alexstine, aristath, kevin940726, ndiego, 0mirka00, poena, joen, ryankienstra, desrosj, vtad, nithins53, audrasjb, kacper3355, sabernhardt.
Merges [54811] to the 6.1 branch.
Fixes #57038, #56818, #56955, #56923.
Built from https://develop.svn.wordpress.org/branches/6.1@54812


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 14:56:45 +00:00
desrosj 93cac07625 Menus: Apply `menu-item-has-children` class in sub-menus.
Ensure the `menu-item-has-children` class is added to sub-menu items when `wp_nav_menu()` is called with the `depth` parameter specified to a non-zero value.

Follow up to [54478].

Props davidvongries, fpodhorsky, hellofromTonya, innovext, larsmqller, LeonidasMilossis, mattkeys, mukesh27, nuvoPoint, ocean90, outrankjames, petitphp, SergeyBiryukov, sippis, webmandesign, peterwilsoncc.
Merges [54801] to the 6.1 branch.
Fixes #56946.
See #28620.
Built from https://develop.svn.wordpress.org/branches/6.1@54809


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 02:43:12 +00:00
desrosj d8cd75854d Docs: Update comments in `wp_nav_menu()` tests per the documentation standards.
Includes:

- Fixing a few typos.
- Using the correct format for multi-line comments.
- Removing some comments that duplicate the assertion messages without providing any additional context. 

Follow-up to [54478].

Props SergeyBiryukov.
Merges [54741] to the 6.1 branch.
See #56792, #56946.
Built from https://develop.svn.wordpress.org/branches/6.1@54808


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 02:41:13 +00:00
desrosj 03af8a6e91 Media: Prevent decoding attribute corrupting JSON data.
Workaround `wp_img_tag_add_decoding_attr()` potentially breaking JavaScript and JSON data by limiting the addition of the decoding attribute to image tags using unescaped double quoted attributes `src` attributes.

Props rodricus, TimothyBlynJacobs, joelmadigan, mw108, adamsilverstein, flixos90, desrosj, mukesh27, peterwilsoncc.
Merges [54802] to the 6.1 branch.
Fixes #56969.
Built from https://develop.svn.wordpress.org/branches/6.1@54807


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 02:28:13 +00:00
desrosj bc26f71bc1 I18N: Initialize textdomain registry in `wp_load_translations_early()`.
Initialize `WP_Textdomain_Registry` in `wp_load_translations_early()`. This ensures the global `$wp_textdomain_registry` is set up prior to loading the translations.

Props azurseisme, TimothyBlynJacobs, costdev, ocean90, flixos90, swissspidy, peterwilsoncc.
Merges [54803] to the 6.1 branch.
Fixes #57051.
Built from https://develop.svn.wordpress.org/branches/6.1@54806


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 02:26:13 +00:00
Felix Arntz 15e9ecd961 Editor: Improve performance of `WP_Theme_JSON` class by reducing usage of expensive array functions.
In many scenarios array functions are more expensive than using simpler `for` or `foreach` loops.

This changeset results in roughly 4% faster `wp_head` execution time for both block themes and classic themes. While this may seem like a small win, it is a worthwhile enhancement and only one part of several other little performance tweaks which are being worked on to improve performance of `theme.json` parsing further.

Props aristath, desrosj, jrf, spacedmonkey.
Merges [54804] to the 6.1 branch.
Fixes #56974.
See #57067.

Built from https://develop.svn.wordpress.org/branches/6.1@54805


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 02:07:13 +00:00
Felix Arntz 309d6d1df8 Editor: Avoid running certain logic around `theme.json` parsing unnecessarily for classic themes.
Here's what it does:
* Do not load and parse `theme-i18n.json` schema if the theme does not have a `theme.json` file.
* Fix the variable caching layer around the theme's `theme.json` parsing so that a parent's theme `theme.json` is cached as well.
* Do not run a `WP_Query` for global styles for a user when the theme does not have a `theme.json`.

In a basic WordPress setup, this changeset improves `wp_head` execution time for classic themes by 10%, and overall response time for both block themes and classic themes by 4%. This may seem like a small win, but 4% reduced overall response time is actually quite a bit for one change, and it is worth mentioning that this is just one of several other little performance tweaks which are being worked on to improve performance of `theme.json` parsing further.

Props flixos90, manuilov, oandregal, peterwilsoncc, spacedmonkey.
Merges [54799] to the 6.1 branch.
Fixes #56945.

Built from https://develop.svn.wordpress.org/branches/6.1@54800


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 22:42:13 +00:00
Dominik Schilling bf169434a2 I18N: Always pass `$locale` to `load_textdomain()`.
In [53874] the optional `$locale` parameter was added to `load_textdomain()`. While most `load_textdomain()` calls in core were were updated, some were missed. Passing the original locale avoids the need to call `determine_locale()` by `load_textdomain()` which is used as a fallback.

Props ocean90, swissspidy, desrosj.
Merges [54797] to the 6.1 branch.
Fixes #57060.
Built from https://develop.svn.wordpress.org/branches/6.1@54798


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 19:44:13 +00:00
Dominik Schilling 0609e60b70 I18N: Revert [54795] from the 6.1 branch.
This will be added again once committed to trunk first.

See #57060.
Built from https://develop.svn.wordpress.org/branches/6.1@54796


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 19:36:12 +00:00
Dominik Schilling 78f74518f1 I18N : Always pass `$locale` to `load_textdomain()`.
In [53874] the optional `$locale` parameter was added to `load_textdomain()`. While most `load_textdomain()` calls in core were were updated, some were missed. Passing the original locale avoids the need to call `determine_locale()` by `load_textdomain()` which is used as a fallback.

Props ocean90, swissspidy, desrosj.
Fixes #57060.
Built from https://develop.svn.wordpress.org/branches/6.1@54795


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 19:21:12 +00:00
desrosj c5374bbbdc Canonical: Protect against error for term not exists queries.
Prevent term `NOT EXISTS` queries causing `redirect_canonical()` to throw a fatal error in PHP 8 and above, or a warning in earlier versions.

This ensures the `tax_query`'s `terms` property both exists and is countable before attempting to count it.

Props codesdnc, SergeyBiryukov, kadamwhite, costdev, miguelaxcar.
Merges [54785] to the 6.1 branch.
Fixes #55955.
Built from https://develop.svn.wordpress.org/branches/6.1@54793


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 16:25:14 +00:00
audrasjb 98d234aef0 Text Changes: Replace "Full site editing" with "Site Editor".
This changeset replaces the various occurrences of "Full site editing" with "Site Editor" as it is the new official name of the feature.
For more background about this change, see https://make.wordpress.org/updates/2022/11/04/site-editor-a-more-user-friendly-name/.

Props audrasjb, peterwilsoncc, poena, ocean90, Mamaduka, desrosj.
Fixes #57026.
Merges [54786], [54787], and [54788] to the 6.1 branch.

Built from https://develop.svn.wordpress.org/branches/6.1@54792


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 16:23:14 +00:00
hellofromTonya c591c9f198 Update/Install: Deactivate Gutenberg plugin version older than 14.1.
Resolves a fatal error due to `get_template_hierarchy()` due to incompatible older Gutenberg versions.

[54269] introduced this new function for 6.1. This function was introduced in Gutenberg 13.9.0. However, it was not guarded to protect the plugin from when the function was loaded in Core. Gutenberg 14.1.0 added the `function_exists()` wrapper to protect the plugin from the fatal error.

Minimum compatible version:
This commit changes the Gutenberg minimum compatible version number to 14.1. For versions older than 14.1, the plugin will deactivate when upgrading Core to 6.1 or newer.

Function rename:
Past commits renamed the upgrade function by changing Core's version number. This commit renames the function to be generic, i.e. `_upgrade_core_deactivate_incompatible_plugins()` and adopts the `@since [reason]` strategy to track historical changes to the function. 

Follow-up to [54269], [52199], [52166], [52165], [51180].

Props namithjawahar, hellofromTonya, azaozz, desrosj, ironprogrammer.
Merges [54789] to the 6.1 branch.
Fixes #56985.
Built from https://develop.svn.wordpress.org/branches/6.1@54790


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-10 12:39:13 +00:00