Commit Graph

48541 Commits

Author SHA1 Message Date
Sergey Biryukov
02fe60ddab Coding Standards: Remove a redundant section in the phpcs.xml.dist ruleset.
The affected lines already have ignore annotations in the `wp-includes/class-wp-block-parser-block.php` file itself.

Follow-up to [56048], [56738], [56743], [56751], [56752], [56753].

Props jrf, SergeyBiryukov.
See #59161.
Built from https://develop.svn.wordpress.org/trunk@57017


git-svn-id: http://core.svn.wordpress.org/trunk@56528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-27 08:29:27 +00:00
Peter Wilson
2aa3f8fbeb Options, Meta APIs: Rename option cache priming functions.
Rename the option cache priming functions to more closely follow the naming convention used by other cache priming functions.

* `wp_load_options()` becomes `wp_prime_option_caches()`
* `wp_load_options_by_group()` becomes `wp_prime_option_caches_by_group()`

The unit test files and classes are renamed accordingly.

Unlike the existing cache priming functions, these functions were introduced with the intention of being public so use the `wp_` prefix rather than the `_` prefix used by the functions initially introduced as private functions but since made public.

Follow up to [56445],[56990].

Props flixos90, peterwilsoncc, joemcgill, SergeyBiryukov, desrosj.
Fixes #58962.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 22:56:19 +00:00
Aaron Jorbin
a0d7172914 REST API: Move rest_pre_serve_request filter to after no cache headers are sent.
[56834] adjusted the order of activity inside the rest server responses. This lead to the `rest_pre_serve_request` filter potentially blocking the sending of the no cache headers. This moves that action back to being after the sending of no cache headers has finished to restore the pre 6.3.2 order of these two actions.

Props perrelet, SergeyBiryukov, peterwilsoncc.
Fixes #59722.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 22:36:25 +00:00
Sergey Biryukov
39ccc3798d Tests: Use a @requires annotation for readonly() function test.
The function is only defined by WordPress core on PHP < 8.1.

Follow-up to [51586].

See #59647.
Built from https://develop.svn.wordpress.org/trunk@57011


git-svn-id: http://core.svn.wordpress.org/trunk@56522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 20:33:22 +00:00
Felix Arntz
e5d1fca198 Themes: Fix block theme supports being added too early, leading to Customizer live preview bugs in 6.4.
The Customizer live preview broke because of [56635], however the root cause for the bug was a lower-level problem that had been present since WordPress 5.8: The block theme specific functions `_add_default_theme_supports()` and `wp_enable_block_templates()` were being hooked into the `setup_theme` action, which fires too early to initialize theme features. Because of that, theme functionality would be initialized before the current theme setup being completed. In the case of the Customizer, that includes overriding which theme is the current theme entirely, thus leading to an inconsistent experience.

This changeset fixes the bug by moving those two callbacks to the `after_setup_theme` action, which is the appropriate action to initialize theme features.

Props karl94, hellofromTonya, joemcgill, flixos90.
Fixes #59732.
See #18298, #53397, #54597.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 18:44:26 +00:00
Sergey Biryukov
9618b1e89b Tests: Remove some unnecessary multisite test skipping.
These checks are redundant, as the skipping already handled by the `ms-required` and `ms-excluded` groups.

Follow-up to [36740], [36741], [38705], [40520], [51415].

Props johnbillion.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@57008


git-svn-id: http://core.svn.wordpress.org/trunk@56519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-25 11:22:24 +00:00
desrosj
955a0ec66b Twenty Twenty-Four: Include file renaming for RC2.
This includes a file renaming that was missed in [56999].

Follow-up to [56999], [56951], [56813], [56764], [56716].

Props hellofromTonya, huzaifaalmesbah.
See #59711.
Built from https://develop.svn.wordpress.org/trunk@57003


git-svn-id: http://core.svn.wordpress.org/trunk@56514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:35:23 +00:00
desrosj
d85bc099a0 Twenty Twenty-Four: Bug fixes for 6.4 RC2.
This update includes updates to patterns to correct color issues and some code quality fixes.

Follow-up to [56951], [56813], [56764], [56716].

Props luminuu, richtabor, onemaggie, kafleg, swissspidy, huzaifaalmesbah, neilorangepeel, shailu25, lada7042, mukesh27, nilovelez, jorbin.
Fixes #59711.
Built from https://develop.svn.wordpress.org/trunk@56999


git-svn-id: http://core.svn.wordpress.org/trunk@56510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:06:25 +00:00
Sergey Biryukov
e6a1e0059e Tests: Correct the WP_Test_Stream::mkdir() method.
The method attempted to check if there is already a file with the same name, however the conditional used an undefined variable.

This commit prevents directory creation if a file or directory with the same name already exists, bringing consistency with the PHP `mkdir()` implementation.

Includes adding missing documentation for the method.

Reference: [https://www.php.net/manual/en/streamwrapper.mkdir.php PHP Manual: streamWrapper::mkdir()].

Follow-up to [49230].

Props david.binda, sadizaman, rajinsharwar, SergeyBiryukov.
Fixes #59406.
Built from https://develop.svn.wordpress.org/trunk@56998


git-svn-id: http://core.svn.wordpress.org/trunk@56509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 11:34:40 +00:00
hellofromTonya
8a2a1f4b41 Tests: Fix static property handling in r56991.
Fixes static property handling for `WP_Duotone::$block_css_declarations` in the `Tests_Block_Supports_Duotone::test_css_declarations_are_generated_even_with_empty_block_content()`:

* Fixes `ReflectionProperty::setValue()` to use an instance of `WP_Duotone`.
* Adds an inline comment to explain why a static class (i.e. a class that is not intended to be an object by design as it only contains static properties and methods) needs an instance, i.e. needed for PHP 8.3 and higher.
* Resets the static property's value to its original value, i.e. before the test started.

Follow-up to [56991].

Props costdev.
See #59694.
Built from https://develop.svn.wordpress.org/trunk@56996


git-svn-id: http://core.svn.wordpress.org/trunk@56507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 10:59:27 +00:00
Bernhard Reiter
2e0baf4f79 Blocks: Fix layout support to be compatible with enhanced pagination.
Make layout support compatible with enhanced pagination by ensuring that generated class names are stable across pagination, even when the number of rendered posts is different.

With the previous implementation of enhanced pagination, the CSS corresponding to each block was not detected. Therefore, for enhanced pagination to work correctly, the CSS of the blocks present in the Post Template must be stable on all pages.

The number of posts rendered by the Query block is always the same, except in the last page, where it can be only a fraction. If any of the blocks rendered by the Post Template used the `wp_unique_id` function, the ID (which is incremental) would have been different than in the previous pages and the class names would have varied.

This is remediated by this changeset by replacing the usage of `wp_unique_id` in the layout support (which is used by the Query block) with an implementation that uses IDs that are incremental only for that block. That way, the generated class names are never affected by the number of times `wp_unique_id` runs.

Props luisherranz, andrewserong, isabel_brison, costdev, mukesh27, cbravobernal, hellofromTonya, jorbin.
Fixes #59681.
Built from https://develop.svn.wordpress.org/trunk@56994


git-svn-id: http://core.svn.wordpress.org/trunk@56505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 08:51:24 +00:00
Peter Wilson
24b0b5bf5f Build/Test tools: Introduce partial unit tests for WP_Upgrader.
Props jipmoors, karlijnbk, chaion07, cu121, martin.krcho, costdev, mukesh27, hellofromTonya, SergeyBiryukov, audrasjb, jrf.
Fixes #54245.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 01:40:21 +00:00
hellofromTonya
ab9c4659ae Editor: Fix render_duotone_support() to be compatible with enhanced pagination.
Some blocks do not have content. For duotone support, blocks without content still need to run through the `render_duotone_support()` to render their duotone CSS.

This fix makes the duotone compatible with the enhanced pagination (introduced in 6.4.0) by making sure that the CSS is always on the page, even when the posts have no featured image. It also prevents the duotone from interfering with other blocks using `wp_unique_id()`.


References:
* [https://github.com/WordPress/gutenberg/pull/55415 Gutenberg PR 55415]

Follow-up to [56226].

Props cbravobernal, luisherranz, hellofromTonya, isabel_brison, jorbin.
Fixes #59694.
Built from https://develop.svn.wordpress.org/trunk@56991


git-svn-id: http://core.svn.wordpress.org/trunk@56502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 23:39:20 +00:00
Felix Arntz
cd27e64cef Options, Meta APIs: Rename prime_options() to wp_load_options().
This clearly separates these functions which are intended to be used by external developers from the existing `_prime_*_caches()` functions which are primarily intended for internal usage. The term "load" is additionally more accessible than "prime".

This changeset renames the above function, as well as the wrapper function `prime_options_by_group()` to `wp_load_options_by_group()`.

Props peterwilsoncc, joemcgill, hellofromTonya, poran766, flixos90.
Fixes #58962.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 21:29:27 +00:00
Tammie Lister
4312036aca Update editor related npm packages for 6.4 RC2.
The npm packages needed update for 6.4 RC2.

Props siobhyb, cbravobernal, DAreRodz, luisherranz, artemiosans, afercia, jameskoster, czapla, alexstine, SantosGuillamot, ramonopoly, isabel_brison, andrewserong, jeryj, joedolson

See #59411.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 17:08:31 +00:00
Pascal Birchler
1555e715f6 Sitemaps: add lastmod for individual posts and the homepage.
When the XML sitemaps feature was originally introduced, the `lastmod` field was omitted because guidance at the time indicated it was less important for search engines, plus for some entities it was computationally expensive to add. Now that the guidance has slightly changed, we are revisiting this and adding `lastmod` where easily possible.

- Adds `lastmod` to all individual post objects (of any post type) in the sitemap
- Adds `lastmod` to the homepage sitemap entry if the homepage is set to display the latest posts.

No `lastmod` is added for the individual sitemap pages in the sitemap index, nor for term archives or user archives. Those enhancements require additional changes, such as storing the modified date for a taxonomy term when something is added to that term. They can be revisited in separate follow-up tickets.

Props swissspidy, joemcgill.
Fixes #52099
Built from https://develop.svn.wordpress.org/trunk@56985


git-svn-id: http://core.svn.wordpress.org/trunk@56496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 15:42:22 +00:00
Sergey Biryukov
a2b495afa9 Docs: Improve documentation for meta revision functions.
Includes:

* Correcting the position of `@since 6.4.0` in a few places.
* Adding missing `@return` documentation.
* Adjusting parameter spacing.

Follow-up to [56714].

Props jeremyfelt, mukesh27.
Fixes #59666.
Built from https://develop.svn.wordpress.org/trunk@56984


git-svn-id: http://core.svn.wordpress.org/trunk@56495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 13:17:22 +00:00
gziolo
c7919d32db Tests: Improve code coverage for _build_block_template_result_from_file
Props costdev, bernhard-reiter.
See #54335, #59325.
Follow-up for [56562].


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


git-svn-id: http://core.svn.wordpress.org/trunk@56494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 05:38:35 +00:00
Sergey Biryukov
ad9048c923 General: Bump the recommended MySQL version in readme.html.
MySQL 5.7 reaches EOL (“End of Life”) in October 2023. The recommended minimum is bumped to 8.0 for now.

References:
* [https://www.mysql.com/support/ MySQL Support Policies]
* [https://make.wordpress.org/hosting/handbook/server-environment/#database Hosting team handbook: Server Environment: Database]

Follow-up to [31291], [33946], [35759], [52420], [52421], [54069].

Props swissspidy, SergeyBiryukov.
See #59701.
Built from https://develop.svn.wordpress.org/trunk@56982


git-svn-id: http://core.svn.wordpress.org/trunk@56493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-22 09:05:25 +00:00
Sergey Biryukov
8088dc8cec Tests: Correct test class name for WP_Duotone unit tests.
Follow-up to [56101].

Props cbravobernal.
Fixes #59696.
Built from https://develop.svn.wordpress.org/trunk@56981


git-svn-id: http://core.svn.wordpress.org/trunk@56492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-21 10:21:27 +00:00
Pascal Birchler
62d53d3ff9 Build/Test Tools: Remove now obsolete jest-image-snapshot dependency.
With the migration of visual regression tests to Playwright in [56926], this package is no longer needed and can be safely removed.

See #59517.
Built from https://develop.svn.wordpress.org/trunk@56980


git-svn-id: http://core.svn.wordpress.org/trunk@56491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-21 08:38:29 +00:00
Joe McGill
8d7ccf869d Themes: Make caches for block patterns clearable.
In [56765], theme block pattern files were cached to a transient as a performance enhancement. However, transients are not easily clearable when caches are flushed on environments not using a persistent cache, which can lead to errors if the theme files are renamed, edited, or moved.

This changes the caching mechanism to use `wp_cache_set()` instead, and caches these values to the global group so they are still persistent on environments using an object cache, and will be cleared by a cache flush.

In addition, the helper `_wp_get_block_patterns` has been moved `WP_Theme::get_block_patterns` for consistency with other block related theme methods and cache helpers for these values, `WP_Theme::get_pattern_cache` and `WP_Theme::set_pattern_cache`, have been made private.

Relevant unit tests updated.

Props: afercia, flixos90, mukesh27, joemcgill.
Fixes #59633. See #59591, #59490.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-20 19:08:21 +00:00
desrosj
915f28e18e Build/Test Tools: Use the correct path to build process test workflows.
Follow up to [56976].

See #59632.
Built from https://develop.svn.wordpress.org/trunk@56977


git-svn-id: http://core.svn.wordpress.org/trunk@56488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-20 17:13:23 +00:00
desrosj
deb2462101 Build/Test Tools: Test the Gutenberg plugin build process.
A very common contributor setup is having a copy of the `gutenberg` development repository within a checkout of the `wordpress-develop` repository. On occasion, there are some strange incompatibilities that come up when using this setup. A few examples can be seen in #58671 and #59634.

This changeset helps ensure that these edge cases are not introduced by testing the Gutenberg plugin’s build process within WordPress configured to run from both the `src` and `build` directories.

This also renames the “Test npm” workflow to a more general “Test Build Processes”, which more accurately describes what is actually being tested within it and allows these new test jobs to be grouped in.

And finally, the logic within the workflow has been split out into two callable workflows. This helps avoid code duplication within the workflow, and allows for better grouping on the workflow run screen.

Props swissspidy, aferica, SergeyBiryukov, antonvlasenko, desrosj.
Fixes #59632. See #58671, #59634.
Built from https://develop.svn.wordpress.org/trunk@56976


git-svn-id: http://core.svn.wordpress.org/trunk@56487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-20 14:56:21 +00:00
Sergey Biryukov
6fae0d706a External Libraries: Update getID3 to version 1.9.23.
The latest version includes numerous bug fixes, a few new features, as well as various improvements for PHP 8.1 and PHP 8.2 support.

This commit also includes PHPCS adjustments previously made for a passing PHP Compatibility scan.

References:
* [https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.23 getID3 1.9.23 release notes]
* [https://github.com/JamesHeinrich/getID3/compare/v1.9.22...v1.9.23 Full list of changes in getID3 1.9.23]

Follow-up to [47601], [48278], [52254], [54376].

Props jrf.
Fixes #59683.
Built from https://develop.svn.wordpress.org/trunk@56975


git-svn-id: http://core.svn.wordpress.org/trunk@56486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-20 13:29:27 +00:00
Felix Arntz
bbe67a0147 Multisite: Ensure that switching sites resets the current theme directory globals.
The globals introduced in [56635] to cache the current theme directories in memory were not considering switching sites in a multisite network. This changeset addresses the bug including test coverage.

Props codex-m, jeremyfelt.
Fixes #59677.
See #18298.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-19 19:09:21 +00:00
desrosj
9b66ebdf48 Build/Test Tools: Skip Puppeteer download in build workflow.
This adds the `PUPPETEER_SKIP_DOWNLOAD` environment variable to the Build WordPress workflow to skip downloading Puppeteer browser binaries unnecessarily.

Follow up to [56958].

See #59416, #59517, #58863.
Built from https://develop.svn.wordpress.org/trunk@56973


git-svn-id: http://core.svn.wordpress.org/trunk@56484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-19 15:05:24 +00:00
desrosj
207fe0533e Build/Test Tools: Don’t run the performance workflow when branching.
When a branch is created, there is no previous commit to reference in the `github.event.before` context, which causes the performance workflow to fail because there is no previous commit to perform a comparison with.

This adds a condition to check that `github.event.before` is not set to `0000000000000000000000000000000000000000`, which is the default value when there are no previous commits.

Props swissspidy.
See #588867.
Built from https://develop.svn.wordpress.org/trunk@56972


git-svn-id: http://core.svn.wordpress.org/trunk@56483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-19 14:00:22 +00:00
Sergey Biryukov
73a3875f2b Tests: Improve the @group annotation accuracy and consistency.
Includes removing `.php` from some older group names, because most of the groups are no longer named based on the file containing the function, and sometimes functions move around, making the file-based group name inaccurate.

Props afercia, aristath, poena, SergeyBiryukov.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@56971


git-svn-id: http://core.svn.wordpress.org/trunk@56482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-19 13:53:24 +00:00
Bernhard Reiter
b0da2934b9 Blocks: During traversal, allow post callback to modify block.
Both the `$pre_callback` and `$post_callback` functions that are given as arguments to `traverse_and_serialize_block(s)` receive a reference to the current block as their first argument. However, while any changes that the "pre" callback makes to the block are reflected by the serialized markup, the same wasn't true for the "post" callback: Any changes that it made were only applied ''after'' the block had already been serialized.

This commit changes the behavior such that `$post_callback`'s changes to the current block are also reflected in the serialized markup.

See #59646.
Props gziolo.
Fixes #59669.
Built from https://develop.svn.wordpress.org/trunk@56970


git-svn-id: http://core.svn.wordpress.org/trunk@56481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-18 19:32:23 +00:00
Sergey Biryukov
1470782029 Tests: Remove some unnecessary function_exists() checks for compat functions.
Each of these functions already has a separate test for availability.

If any of them are unavailable, then the test should fail rather than be skipped.

Follow-up to [52038], [52039], [52040].

Props johnbillion.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@56969


git-svn-id: http://core.svn.wordpress.org/trunk@56480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-18 10:41:29 +00:00
hellofromTonya
afa66e5fa0 Build/Test Tools: Fix WP version in package-lock.json.
After [56966], CI jobs that check the `package-lock.json` failed on the "Ensure version-controlled files are not modified or deleted" task.

There are 2 version fields that need to be updated for the new WP version. This changeset updates the "packages" > "version" for 6.5.0.

Follow-up to [56966].

Props swissspidy, benharri.
Unprops hellofromTonya.
Fixes #59665.
Built from https://develop.svn.wordpress.org/trunk@56968


git-svn-id: http://core.svn.wordpress.org/trunk@56479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 20:36:26 +00:00
hellofromTonya
da2e6dc4e3 Fix version number for 6.5-alpha.
Fixes the version number from [56966] to include its number in the version, as it is the commit that opened trunk for 6.5-alpha.

Follow-up to [56966].
Built from https://develop.svn.wordpress.org/trunk@56967


git-svn-id: http://core.svn.wordpress.org/trunk@56478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 18:50:19 +00:00
hellofromTonya
891a9ecdaf Trunk is now 6.5 alpha.
Built from https://develop.svn.wordpress.org/trunk@56966


git-svn-id: http://core.svn.wordpress.org/trunk@56477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 18:41:24 +00:00
hellofromTonya
bfe933241e Post WordPress 6.4 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@56964


git-svn-id: http://core.svn.wordpress.org/trunk@56475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:46:44 +00:00
hellofromTonya
77df68f144 WordPress 6.4 RC1 - capitalize RC in version.
Capitalize RC in the version, i.e. just in case the build requires it.

Unprops hellofromTonya.
Built from https://develop.svn.wordpress.org/trunk@56963


git-svn-id: http://core.svn.wordpress.org/trunk@56474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:27:20 +00:00
hellofromTonya
fc3d3cf491 WordPress 6.4 RC1.
Built from https://develop.svn.wordpress.org/trunk@56962


git-svn-id: http://core.svn.wordpress.org/trunk@56473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:19:23 +00:00
hellofromTonya
e395ce0cf6 Editor: Bugfixes npm packages updates for 6.4 RC1.
Updates for needed bugfixes in RC1:

* [https://github.com/WordPress/gutenberg/pull/55212 Image: Reimplement lightbox trigger as a minimal button in corner of image]

* [https://github.com/WordPress/gutenberg/pull/55403 [Edit Widgets] Only suppress admin notices when JS enabled.]

Follow-up to [56849], [56818], [56816].

Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56961


git-svn-id: http://core.svn.wordpress.org/trunk@56472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 16:08:23 +00:00
Bernhard Reiter
c054eef096 Patterns, Templates: Inject theme attr into Template Part blocks.
It was found that Template Part blocks were broken in the Site Editor, showing the `Template part has been deleted or is unavailable` message, due to a missing `theme` attribute.

This bug seems to have been introduced by [56896], whose goal was to only inject that attribute into the markup returned by the templates and patterns REST API endpoints but not on the frontend, in order to improve performance. It has been demonstrated locally that reverting that changeset fixes the bug.

Reverts [56896].
Props mmcalister, swisspidy, thelovelist, hellofromTonya, pbiron, Pauthake015, richtabor, nicolefurlan, huzaifaalmesbah, annezazu, kafleg, aegkr, sunitarai, shresthaaman, andraganescu, onemaggie, gziolo.
Fixes #59629.
Built from https://develop.svn.wordpress.org/trunk@56960


git-svn-id: http://core.svn.wordpress.org/trunk@56471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 15:48:23 +00:00
hellofromTonya
3d5cf30808 Bundled Themes: Revert 56451.
Reverts [56451] to avoid the following issues:

* missing the default `font-size` for anyone who does not use the size control.
* unintentional reduction in citation's `line-height` down to the `--pullquote--line-height` value (1.3 instead of 1.6).

With 6.4 RC1 happening shortly, this revert is necessary to avoid shipping this issues in the release, while giving the time needed to resolve in the next cycle.

Follow-up to [56451].

Props sabernhardt, nicolefurlan.
See #57854.
Built from https://develop.svn.wordpress.org/trunk@56959


git-svn-id: http://core.svn.wordpress.org/trunk@56470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:50:21 +00:00
zieladam
5dc3f83a07 Build/Test Tools: Store WordPress.zip for every GitHub Pull Request as a GitHub artifact.
Storing build files enables reusing them in WordPress Playground and ultimately implementing a Pull Request.

Props desrosj, bernhard-reiter
See #59416.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:42:19 +00:00
desrosj
ceb29562f3 Build/Test Tools: Update build related dependencies.
This updates the following development dependencies to their latest versions:
- `postcss`
- `qunit`
- `sass`
- `webpack`

Additionally, `npm audit fix` has been run.

Fixes #58863.
Built from https://develop.svn.wordpress.org/trunk@56957


git-svn-id: http://core.svn.wordpress.org/trunk@56468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:34:27 +00:00
desrosj
4ce3b9978e Build/Test Tools: Update the caniuse-lite database.
This updates the data for the `caniuse-lite` package and runs `grunt precommit:css`.

Fixes #58869.
Built from https://develop.svn.wordpress.org/trunk@56956


git-svn-id: http://core.svn.wordpress.org/trunk@56467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:20:23 +00:00
desrosj
ee64273620 Build/Test Tools: Add environment variable for current release.
This adds a global environment variable to the Test old branches workflow to make the supported version more clear and easier to update in the future. This will also make it easier to reference in more places as this workflow grows.

See #58867.
Built from https://develop.svn.wordpress.org/trunk@56955


git-svn-id: http://core.svn.wordpress.org/trunk@56466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 12:44:25 +00:00
Pascal Birchler
9f39b4ea0f Build/Test Tools: Reinstate PUPPETEER_SKIP_DOWNLOAD for most CI workflows.
The `PUPPETEER_SKIP_DOWNLOAD` environment variable is used to prevent Puppeteer from automatically downloading browser binaries.
It was removed in [56926] due to the migration to Playwright. However, because of the QUnit tests, Puppeteer is actually still a dependency.

Until those tests change, we have to keep this environment variable to prevent unnecessary downloads on CI.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 11:29:27 +00:00
Sergey Biryukov
fe3efe9810 HTML API: Scan to end of tag when getting updated HTML output.
When applying updates to HTML, one step was left out in [56941] which updated the position of the end of the current tag. This made it possible to create bookmarks with null or earlier end positions than their start position. This in turn broke the Directive Processor in Gutenberg during the backport of changes from Core into Gutenberg.

In this commit, after applying updates, the HTML document is now scanned fully to the end of the current tag, updating the internal pointer to its end, so that nothing else will be broken or misaligned.

Follow-up to [56941].

Props dmsnell.
Fixes #59643.
Built from https://develop.svn.wordpress.org/trunk@56953


git-svn-id: http://core.svn.wordpress.org/trunk@56464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 10:39:27 +00:00
Sergey Biryukov
41a5f69fde Twenty Nineteen: Correct the required WordPress version in theme headers.
The required version was previously set to two different values:
* 4.7 in the theme's `functions.php` file.
* 4.9.6 in theme headers, because of the `the_privacy_policy_link()` function usage in `footer.php`.

However, as `the_privacy_policy_link()` call is wrapped in a `function_exists()` check, it does not affect the requirements in practice.

This commit aims to correct the discrepancy by updating theme headers to match the actual required WP version.

Follow-up to [43808], [43892].

Props poena, kafleg, felipeelia, audrasjb, huzaifaalmesbah, shailu25, nicolefurlan, oglekler.
Fixes #59557.
Built from https://develop.svn.wordpress.org/trunk@56952


git-svn-id: http://core.svn.wordpress.org/trunk@56463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 09:54:23 +00:00
hellofromTonya
244f676c59 Twenty Twenty-Four: Bugfixes for 6.4 RC1.
Resyncing changes for TT4 into Core.

Changes include:
* Reformatted all the patterns for readability.
* Bugfixes in the markup and improvements on the string translation functions.
* Renaming of some patterns, making them consistent with the content they show and whether they are simple patterns, full-page patterns or patterns meant to replace templates.

Follow-up to [56813], [56764], [56716].

Props richtabor, onemaggie, luminuu, shailu25, dunhakdis, shivashankerbhatta, dajeema, enodekciw, kafleg, viralsampat, glendaviesnz, beafialho, webmandesign, huzaifaalmesbah, gregfuller, benharri.
Fixes #59640.
Built from https://develop.svn.wordpress.org/trunk@56951


git-svn-id: http://core.svn.wordpress.org/trunk@56462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 02:14:24 +00:00
Aaron Jorbin
223c80ef92 Help/About: Update the About page for 6.4.
Also includes updates to the contribute, credits, freedom and privacy pages.

Props luminuu, rmartinezduque, estelaris, jorbin, mukesh27, cbringmann, richtabor, annezazu, nudge, ohia, acirujano, elmastudio, cathibosco1, sereedmedia, markoserb, joen. (Also someone named Allison who I am going to guess is Taylor Alison Swift but has no avatar so I will never know)

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


git-svn-id: http://core.svn.wordpress.org/trunk@56461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 02:02:24 +00:00
Peter Wilson
6876d19129 Options, Meta APIs: Prevent saving of invalid timezones.
Prevent the saving of invalid timezone string in to the database on the options pages. If an invalid timezone is submitted it is ignored and the setting remains unchanged.

This prevents a warning or fatal (depending on the PHP version) from being thrown by an invalid timezone setting on the Settings > General page.

Props ankit-k-gupta, costdev, huzaifaalmesbah, mrinal013, nicolefurlan, oglekler.
Fixes #58814.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 23:51:24 +00:00