Commit Graph

37554 Commits

Author SHA1 Message Date
Sergey Biryukov 1920c58314 Editor: Correct the number of arguments for `WP_HTML_Tag_Processor::get_tag()`.
This resolves an issue with `::get_tag()` being called in `WP_Block::replace_html()` with an extra argument, as the method accepts no arguments.

Follow-up to [57514].

Props justlevine, mukesh27.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59361


git-svn-id: http://core.svn.wordpress.org/trunk@58747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-06 12:05:15 +00:00
ramonopoly 16f4229d09 Performance: reuse block metadata in `WP_Theme_JSON::get_valid_block_style_variations()`
In `WP_Theme_JSON::get_valid_block_style_variations()`, the method was calling `self::get_blocks_metadata()` even though the metadata was already retrieved in the parent function. This update reuses the existing block metadata instead of calling it again.  

A new optional parameter, `$blocks_metadata`, has been added to the function, allowing it to use pre-fetched metadata when available, improving efficiency.  

Fewer `self::get_blocks_metadata()` calls mean faster processing, especially in themes with many blocks.

Props mukesh27, ramonopoly, aaronrobertshaw, flixos90.
Fixes #62291.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-06 00:44:15 +00:00
Andrew Ozz a739bf28a1 Media: Fix variable name in `wp_check_filetype_and_ext()`.
Props peterwilsoncc.
See #62272.
Built from https://develop.svn.wordpress.org/trunk@59358


git-svn-id: http://core.svn.wordpress.org/trunk@58744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-06 00:39:18 +00:00
Sergey Biryukov f1ea02c64e Coding Standards: Use `WP_User_Query::get_results()` instead of a private property.
This resolves an issue where the private property `WP_User_Query::$results` is accessed directly in `WP_REST_Users_Controller::get_items()` instead of via the `::get_results()` method.

Follow-up to [38832].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59357


git-svn-id: http://core.svn.wordpress.org/trunk@58743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 23:09:20 +00:00
desrosj 67e72c6e74 Build/Test Tools: Add script for generating code coverage report.
This adds documentation for how to generate code coverage reports to the README.md file.

`test:coverage` has also been added as an npm script to make it easier to generate a report using the local Docker environment. The script will generate an HTML, PHP, and text report file.

Props pbearne, hellofromTonya, netweb.
Fixes #53414.
Built from https://develop.svn.wordpress.org/trunk@59356


git-svn-id: http://core.svn.wordpress.org/trunk@58742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 20:01:18 +00:00
desrosj ca1f54722a Build/Test Tools: Run test coverage when PHPunit workflow changes.
[59287] updated the test coverage workflow to make use of the reusable PHPUnit workflow logic to prevent having duplicate code. The workflow should be run when the reusable file is updated to confirm any changes made work as expected.

See #62221.
Built from https://develop.svn.wordpress.org/trunk@59355


git-svn-id: http://core.svn.wordpress.org/trunk@58741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 18:12:18 +00:00
desrosj 7a5309da64 Build/Test Tools: Update 3rd-party GitHub Actions.
This updates the following GitHub Actions to their latest versions:
- `wow-actions/welcome`
- `actions/setup-node`
- `actions/cache`

See #62221.
Built from https://develop.svn.wordpress.org/trunk@59354


git-svn-id: http://core.svn.wordpress.org/trunk@58740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 18:02:20 +00:00
desrosj a78846dcd0 Bundled Themes: Update Twenty Twenty-Five for 6.7 RC 3.
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into WordPress-Develop for 6.7 RC 3.

A full list of changes can be found on GitHub: b6f4ee2e57...b5b0475f6a.

Props juanfra.
See #62343.
Built from https://develop.svn.wordpress.org/trunk@59348


git-svn-id: http://core.svn.wordpress.org/trunk@58734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 14:02:15 +00:00
get_dave 364a6c50a0 Editor: Update packages for 6.7 RC 3
Syncs @wordpress/* packages to the wp-6.7 npm tag.

Props kevin940726, get_dave, youknowriad

Close #62321.
Built from https://develop.svn.wordpress.org/trunk@59347


git-svn-id: http://core.svn.wordpress.org/trunk@58733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 12:59:25 +00:00
Andrew Ozz 310a481b66 Media: Better variable name and some docs fixes for the new `wp_get_image_editor_output_format()`.
Props peterwilsoncc, apermo, azaozz.
See #62305.
Built from https://develop.svn.wordpress.org/trunk@59346


git-svn-id: http://core.svn.wordpress.org/trunk@58732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-05 04:09:18 +00:00
Peter Wilson e81661e92d Bundled Themes: Bump default theme versions for release with 6.7.
This updates the version of each default theme to the following versions:

* Twenty Ten: 4.3
* Twenty Eleven: 4.8
* Twenty Twelve: 4.4
* Twenty Thirteen: 4.3
* Twenty Fourteen: 4.1
* Twenty Fifteen: 3.9
* Twenty Sixteen: 3.4
* Twenty Seventeen: 3.8
* Twenty Nineteen: 3.0
* Twenty Twenty: 2.8
* Twenty Twenty-One: 2.4
* Twenty Twenty-Two: 1.9
* Twenty Twenty-Three: 1.6
* Twenty Twenty-Four: 1.3

These versions will released in coordination with WordPress 6.7.

Props sh4lin, sabernhardt, mukesh27, chaion07.
Fixes #62034.





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


git-svn-id: http://core.svn.wordpress.org/trunk@58730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-04 23:59:20 +00:00
Sergey Biryukov ea4d309d36 Script Loader: Correct the number of arguments passed to `WP_Styles::get_etag()`.
This fixes an issue with the usage of the new `$wp_styles->get_etag()` method in `wp-admin/load-styles.php`, where `$wp_version` is passed as the first argument instead of `$load` being used as the ''only'' argument.

Follow-up to [58935].

Props justlevine, mukesh27, swissspidy.
See #52217, #61485.
Built from https://develop.svn.wordpress.org/trunk@59341


git-svn-id: http://core.svn.wordpress.org/trunk@58727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-04 15:51:17 +00:00
Sergey Biryukov 5d262aaf83 Coding Standards: Use explicit returns in `WP_Site_Health_Auto_Updates::test_*()`.
This commit corrects several instances of `test_*()` methods potentially returning `void` instead of their documented return types.

Since these methods are public, `null` is used to represent a passed test for backward compatibility with the coercion of the previously-returned `void`. Previous usage of `false` is preserved.

Includes updating some `@return` tags for clarity.

Follow-up to [44986], [46276], [49927].

Props justlevine, apermo, SergeyBiryukov.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59340


git-svn-id: http://core.svn.wordpress.org/trunk@58726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-04 15:25:17 +00:00
kevin940726 b9603f6388 Editor: Update packages for 6.7 RC 3
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Props kevin940726, get_dave.

Close #62321.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-04 13:04:31 +00:00
ramonopoly fd6357ae7b Theme JSON Resolver: remove theme json merge in resolve_theme_file_uris
This commit affects `WP_Theme_JSON_Resolver::resolve_theme_file_uris()`.

When setting resolved URIs in an incoming theme json object, this commit removes the unnecessary call to `WP_Theme_JSON->merge()`. 

Why? `WP_Theme_JSON_Resolver::resolve_theme_file_uris()` only needs to set values for paths in the raw theme json object. It can then return a new theme object based on the updated JSON source. There's no need for a full and possibly expensive merge.

Follow-up to [61588].

Props ramonopoly, aaronrobertshaw, andrewserong.
Fixes #62329.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-04 02:34:16 +00:00
Sergey Biryukov 2dfcb9ea56 Coding Standards: Explicitly return `false` in magic `__isset()` methods.
This commit fixes an issue where some magic `__isset()` methods were potentially returning `void` (if the prop is not in an allow-listed array of fields) instead of an explicit boolean `false`.

Addressed methods:
* `WP_Comment::__isset()`
* `WP_Query::__isset()`

Follow-up to [28523], [31151], [34583], [34599].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59337


git-svn-id: http://core.svn.wordpress.org/trunk@58723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-03 23:03:19 +00:00
Sergey Biryukov 5ef0c89c61 Docs: Add missing `void` to DocBlock `@return` types.
This commit adds missing `void` return types to (parent) methods that can ''explicitly'' return `void` as one of their conditional paths.

Addressed methods:
* `WP_Privacy_Requests_Table::column_status()`
* `WP_Recovery_Mode::handle_error()`
* `WP_Widget::form()` — unlike the others, it's the ''child'' classes that return `void` when the method is correctly implemented.

Note: `@return void` (where `void` is the single type returned) should not be used outside the default bundled themes and the PHP compatibility shims included in WordPress Core, as per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/ documentation standards].

Follow-up to [30382], [42967], [43256], [44973], [45448].

Props justlevine.
See #52217, #62281.
Built from https://develop.svn.wordpress.org/trunk@59336


git-svn-id: http://core.svn.wordpress.org/trunk@58722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-02 15:01:19 +00:00
ramonopoly 3026f3f46d Theme JSON: replace top-level background style objects on merge
This commit fixes an omission in the logic of `WP_Theme_JSON::merge()` where top-level background image style objects are not replaced, rather they are merged. Because background images are self contained objects, their properties are unique and should not be merged. Blocks are already catered for via `WP_Theme_JSON::get_block_nodes()`.

Follow-up to [61858].

Props ramonopoly, andrewserong.
Fixes #62328.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-01 05:26:19 +00:00
Sergey Biryukov 91822bf70c Docs: Correct `@param` type in `fix_phpmailer_messageid()`.
Follow-up to [48033].

Props justlevine.
See #52217, #62281.
Built from https://develop.svn.wordpress.org/trunk@59334


git-svn-id: http://core.svn.wordpress.org/trunk@58720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-01 00:10:17 +00:00
Sergey Biryukov 9adf2cf437 Docs: Correct `@param` tag in `untrailingslashit()` to match the parameter name.
Follow-up to [54927].

Props justlevine.
See #52217, #62281.
Built from https://develop.svn.wordpress.org/trunk@59333


git-svn-id: http://core.svn.wordpress.org/trunk@58719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-31 23:26:15 +00:00
kevin940726 1522e2f001 Editor: Update packages for 6.7 RC 3
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Props kevin940726, ramonopoly, andrewserong.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-31 04:09:28 +00:00
Peter Wilson 74cf68a167 Help/About: Add images to the About page.
Updates the images in the About page source with the final versions on the w.org CDN.

Props ryelle, joen.
See #61961.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-31 00:13:18 +00:00
Sergey Biryukov 2a96d5f4e3 Docs: Correct DocBlock formatting in `wp-includes/class-wp-theme-json.php`.
Follow-up to [52049], [54118], [54162], [55008], [55349], [55959], [55986], [56058], [57496], [58354], [58413].

Props mukesh27, ramonopoly.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59328


git-svn-id: http://core.svn.wordpress.org/trunk@58714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-30 23:52:17 +00:00
Peter Wilson f17b845a78 Tests/Build tools: Only fail importer tests if plugin is missing.
Reverts an earlier change to the test suite in which the PHPUnit tests could not run if the importer plugin was not available.

This update allows the test suite to run and will fail importer tests if the plugin is not available. 

Follow up to r59085.

Props peterwilsoncc, azaozz.
See #62325.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-30 23:29:19 +00:00
Peter Wilson 844fe5cf06 Taxonomy: Remove count references from `WP_Term_Query`.
Remove further documentation and a code reference to the unsupported `count` argument within `WP_Term_Query`. 

Follow up to [59261].

Props johnbillion.
Fixes #61094

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


git-svn-id: http://core.svn.wordpress.org/trunk@58711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-30 22:34:19 +00:00
Sergey Biryukov 7b9673722e Comments: Use a more precise check for disallowed keys on filtered comment data.
The previous approach of running `wp_allow_comment()` twice could have unintended consequences, e.g. the `check_comment_flood` action was also triggered twice, which might lead to false-positive identification of comment flood in case there is some custom callback hooked to it, which is not expecting identical data seeing twice.

This commit introduces a new function, `wp_check_comment_data()`, to specifically check for disallowed content before and after comment data is filtered.

Follow-up to [59267].

Props david.binda, SergeyBiryukov.
See #61827.
Built from https://develop.svn.wordpress.org/trunk@59319


git-svn-id: http://core.svn.wordpress.org/trunk@58705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 15:38:19 +00:00
kevin940726 ccd2ab7f3f Editor: Update packages for 6.7 RC 2
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Props kevin940726, aaronrobertshaw.
See #62309.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 07:33:25 +00:00
Andrew Ozz c53b87650b Media: Fix converting of all HEIC/HEIF images to JPEGs after uploading regardless of dimensions.
Props ironprogrammer, adamsilverstein, azaozz.
Fixes #62305.
Built from https://develop.svn.wordpress.org/trunk@59317


git-svn-id: http://core.svn.wordpress.org/trunk@58703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 06:01:19 +00:00
ramonopoly 35264ca89c Global styles: preload `/global-styles` endpoint responses
This commit fixes a regression whereby requests to global styles endpoints were not being preloaded, resulting in several requests being fired clientside unnecessarily.  

For performance reasons, we  preload the requests so that the data is in the editor store and ready to use straight away.  

The outcome is that the editor loads more quickly.

Follow-up to [62042].

Props ellatrix, ramonopoly, apermo, peterwilsoncc.
Fixes #62315.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 03:13:19 +00:00
Andrew Ozz 152661c1e7 Media: Fix uploading of .heic images.
- Adds support for all HEIC/HEIF mime types: `image/heic`, `image/heif`, `image/heic-sequence`, and `image/heif-sequence`.
- Introduces `wp_is_heic_image_mime_type()`.

Props swissspidy, adamsilverstein, debarghyabanerjee, ironprogrammer, peterwilsoncc, apermo, azaozz.
Fixes #62272.
Built from https://develop.svn.wordpress.org/trunk@59315


git-svn-id: http://core.svn.wordpress.org/trunk@58701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 01:12:17 +00:00
Peter Wilson c09e1c0acd Bundled Themes: Update Twenty Twenty-Five for 6.7 RC 2.
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into WordPress-Develop for 6.7 RC 2

A full list of changes can be found on GitHub: [7dfa99f15b...b5b0475f6a WordPress/twentytwentyfive@7dfa99f1...b5b0475f].

Props juanfra, poena.
See #62310.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-29 00:02:18 +00:00
Sergey Biryukov 52f872f0fc Users: Set correct default value for `$user_login` in `retrieve_password()`.
This resolves a "passing null to non-nullable" deprecation notice on PHP 8.1+:
{{{
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated
}}}

Follow-up to [50129], [54477].

Props afragen, peterwilsoncc, SergeyBiryukov.
Fixes #62298.
Built from https://develop.svn.wordpress.org/trunk@59312


git-svn-id: http://core.svn.wordpress.org/trunk@58698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-28 20:05:19 +00:00
kevin940726 5c3ffeb549 Editor: Update packages for 6.7 RC 2
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Props kevin940726, peterwilsoncc.
See #62309.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-28 04:33:29 +00:00
Peter Wilson a17aba82df Revisions: Fix typo in navigation help text.
Fixes a typo in the a11y helper text explaining how to navigate revisions. "Change revision by using the left and arrow keys" becomes "Change revision by using the left and right arrow keys".

Follow up to [59225].

Props pedromendonca, sabernhardt, fierevere, swissspidy.
Fixes #62306.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-28 00:31:21 +00:00
Sergey Biryukov 787ca6cd53 Tests: Use better domain for HTTP API invalid hostname test.
The previous domain that was used to test for a host whose IPv4 address cannot be resolved, `exampleeeee.com`, got registered and has an A-record now, so it's not invalid anymore.

`.invalid` is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

Reference: [https://datatracker.ietf.org/doc/html/rfc2606#section-2 Reserved Top Level DNS Names: TLDs for Testing, & Documentation Examples].

Follow-up to [52084], [58384], [58388].

Props sippis, johnbillion, MattyRob, swissspidy.
Fixes #62303.
Built from https://develop.svn.wordpress.org/trunk@59293


git-svn-id: http://core.svn.wordpress.org/trunk@58685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-27 19:05:18 +00:00
Sergey Biryukov 2bc86e1ab1 Coding Standards: Correct alignment in `dropdown_cats()`.
Follow-up to [58284].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59292


git-svn-id: http://core.svn.wordpress.org/trunk@58684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-26 21:45:17 +00:00
Sergey Biryukov aed49756e0 Docs: Adjust comments about `set_time_limit()` per the documentation standards.
Includes splitting long comments into multiple lines and moving a few comments above the `function_exists()` check for more consistent placement.

Follow-up to [59039], [59288].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59291


git-svn-id: http://core.svn.wordpress.org/trunk@58683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-25 20:26:20 +00:00
Peter Wilson db2845d2a0 Site Health: Update inline docs following refactor of debug data.
Updates the inline docs following the modularization of the `WP_Debug_Data`.

Props kebbet, desrosj, apermo.
Fixes #61648.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-25 01:20:17 +00:00
Peter Wilson c2441a3d71 Bundled Themes: Provide instructions for updating comment block in TT2.
Adds instructions to the Twenty Twenty-Two readme file for updating the comment block from the legacy version to the newer version introduced in WordPress 6.1.

As Twenty Twenty-Two supports WordPress version prior to 6.1, the legacy comment block is used by default.

Props desrosj, jeffpaul, joedolson, mikachan, mrfoxtalbot, mukesh27, poena, ryokuhi, sabernhardt, thrijith.
Fixes #56496.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-25 00:23:21 +00:00
Sergey Biryukov 11dfb2d162 Revisions: Set PHP time limit when generating revision diffs vis Ajax.
This aims to avoid hanging PHP processes if a plugin inadvertently attempts to request a large number of revision diffs.

Follow-up to [24520], [24707], [59039].

Props madpeter, lovesoni1999, debarghyabanerjee, pbearne, desrosj, SergeyBiryukov.
Fixes #49291.
Built from https://develop.svn.wordpress.org/trunk@59288


git-svn-id: http://core.svn.wordpress.org/trunk@58680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-25 00:00:20 +00:00
desrosj 269aa32b13 Build/Test Tools: Use the reusable PHPUnit test workflow for coverage.
This updates the Test Coverage workflow to make use of the reusable PHPUnit test workflow to avoid having duplicate code.

`concurrency` has also been configured for the workflow, and 4 test jobs have been consolidated into 2.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-24 15:09:17 +00:00
Peter Wilson 1809b18404 Editor: Update Google Fonts API endpoint for WordPress 6.7.
Updates the Google Fonts API to use the URL `https://s.w.org/images/fonts/wp-6.7/collections/google-fonts-with-preview.json` with an updated collection of fonts available for install.

Props dilip2615, mmaattiiaass, wildworks, dd32.
Fixes #62258.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 22:39:17 +00:00
Weston Ruter 204d60314b HTML API: Fix extensibility of `WP_HTML_Processor::next_token()`.
Break out logic from the `next_token()` method into a private method which may call itself recursively. This allows for subclasses to override the `next_token()` method and be assured that each call to `next_token()` corresponds with the consumption of one single token. This also parallels how `WP_HTML_Tag_Processor::next_token()` wraps a private `base_class_next_token()` method.

Props westonruter, jonsurrell.
Fixes #62269.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 22:05:17 +00:00
Sergey Biryukov d885fc7216 Coding Standards: Replace loose comparison in `wp-includes/ms-functions.php`.
This brings more consistency with similar checks elsewhere.

Follow-up to [https://mu.trac.wordpress.org/changeset/1069 mu:1069], [12603].

Props debarghyabanerjee, audrasjb, jrf, aristath, SergeyBiryukov.
Fixes #62032.
Built from https://develop.svn.wordpress.org/trunk@59284


git-svn-id: http://core.svn.wordpress.org/trunk@58676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 18:31:16 +00:00
desrosj bbc789ed0d Build/Test Tools: Support Docker compose override files.
This updates the logic introduced in [59279] to account for the presence of `docker-compose.override.yml` files.

Props xknown, davidbaumwald.
See #61218.
Built from https://develop.svn.wordpress.org/trunk@59283


git-svn-id: http://core.svn.wordpress.org/trunk@58675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 14:58:19 +00:00
desrosj 8df15c4374 Build/Test Tools: Test against MySQL 9.0.
Version 9.0 is the latest short-term innovation release of MySQL.

See #62280.
Built from https://develop.svn.wordpress.org/trunk@59282


git-svn-id: http://core.svn.wordpress.org/trunk@58674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 02:32:18 +00:00
desrosj 390a8be3f5 Build/Test Tools: Split up upgrade test matrix.
GitHub Actions caps the number of jobs that can be spawned from a single matrix at 256.

The changes in [59280] pushed the WordPress 6.x job over this limit. This splits that matrix into two following established pattern for older branches in the workflow.

See #61218, #62221.
Built from https://develop.svn.wordpress.org/trunk@59281


git-svn-id: http://core.svn.wordpress.org/trunk@58673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 01:30:20 +00:00
desrosj 1ebfe6cd88 Build/Test Tools: Test against MySQL 8.4 in automated testing.
Additionally, MySQL 8.1, 8.2 and 8.3 have been removed. These were “innovation releases” and are no longer supported in favor of 8.4, which has LTS.

Props ayeshrajans, johnbillion, aristath, jorbin.
See #61218.
Built from https://develop.svn.wordpress.org/trunk@59280


git-svn-id: http://core.svn.wordpress.org/trunk@58672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 00:15:16 +00:00
desrosj 49af3a39b6 Build/Test Tools: Add MySQL 8.4 support to the Docker environment.
Because `caching_sha2_password` is not supported on PHP 7.2 & 7.3, the local Docker environment has used the `--default-authentication-plugin` system variable to always make use of `mysql_native_password` despite MySQL 8.0 deprecating this auth plugin.

However in MySQL 8.4, the `--default-authentication-plugin` option was removed in favor of `--authentication-policy`, and `mysql_native_password` is now disabled by default. `mysql_native_password` has also been removed in MySQL 9.0.

This change adds support to the local Docker environment for MySQL 8.4 by adding some helper functions that determine which authentication plugin should be used based on the configured PHP/MySQL versions and automatically making the necessary configuration adjustments. 

Props ayeshrajans, johnbillion, aristath, jorbin.
See #61218.
Built from https://develop.svn.wordpress.org/trunk@59279


git-svn-id: http://core.svn.wordpress.org/trunk@58671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-23 00:07:17 +00:00
desrosj cc1b2681dc Build/Test Tools: Revert [59277] to add a proper commit message.
Unprops desrosj.
Built from https://develop.svn.wordpress.org/trunk@59278


git-svn-id: http://core.svn.wordpress.org/trunk@58670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 23:46:16 +00:00
desrosj 43222fcde2 Build/Test Tools: Add support for MySQL 8.4 to the Docker environment.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59277


git-svn-id: http://core.svn.wordpress.org/trunk@58669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 23:43:19 +00:00
desrosj 9dbcd84d99 Build/Test Tools: Run upgrade tests against 6.7-RC1.
The `6.7` version tag does not exist yet. This results in the upgrade tests failing when trying to update from 6.7.

Since `6.7-RC1` exists, this should be used instead.

Follow up to [59275].

See #62221.
Built from https://develop.svn.wordpress.org/trunk@59276


git-svn-id: http://core.svn.wordpress.org/trunk@58668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 18:28:15 +00:00
Aaron Jorbin d6b95fbd12 Post WordPress 6.7 branching version bump.
trunk is now 6.8-alpha.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 17:02:19 +00:00
Aaron Jorbin 885b0a7b78 Post WordPress 6.7 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@59273


git-svn-id: http://core.svn.wordpress.org/trunk@58665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 16:40:16 +00:00
Aaron Jorbin 5087acab42 WordPress 6.7 RC1.
Built from https://develop.svn.wordpress.org/trunk@59272


git-svn-id: http://core.svn.wordpress.org/trunk@58664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 16:17:15 +00:00
desrosj 2071ba2e17 Bundled Themes: Sync a few more Twenty Twenty-Five updates for RC1.
This merges 2 bug fixes for the Twenty Twenty-Five theme from GitHub.

Follow up to [59269].

Props poena, beafialho, juanfra.
Fixes #62264.
Built from https://develop.svn.wordpress.org/trunk@59271


git-svn-id: http://core.svn.wordpress.org/trunk@58663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 15:56:16 +00:00
Sergey Biryukov 0c8459d726 Site Health: Add a link to support forums in the message displayed for a critical error.
Follow-up to [44962], [45263], [46119], [49480], [53951].

Props ipajen, sabernhardt, desrosj, mukesh27, afragen, webcommsat, hellofromTonya.
Fixes #53707.
Built from https://develop.svn.wordpress.org/trunk@59270


git-svn-id: http://core.svn.wordpress.org/trunk@58662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 10:16:16 +00:00
Peter Wilson ad69175f95 Bundled Themes: Update Twenty Twenty-Five for 6.7 RC 1.
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into `trunk` for 6.7 RC 1.

A full list of changes can be found on GitHub: [e4da8ad0ae...f2dc3facf9 WordPress/twentytwentyfive@e4da8ad...f2dc3fa]

Props juanfra, poena, beafialho, areziaal, joen, sergeybiryukov, richtabor, cwhitmore, get_dave, talldanwp, andraganescu, kau-boy, mhkuu, hanneslsm, alaminfirdows, dd32.
See #62264.




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


git-svn-id: http://core.svn.wordpress.org/trunk@58661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 01:43:17 +00:00
isabel_brison 1a1d6c9ea8 Editor: new package updates for 6.7 RC1.
Syncs packages to include two further bug fixes.

Props isabel_brison, peterwilsoncc.
Fixes #62271.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-22 00:32:19 +00:00
Sergey Biryukov 4318418b39 Comments: Validate new comments before and after comment data is filtered.
This ensures that a Disallowed Comment Keys match will consistently send the comment to the Trash, by checking both the original unmodified comment data and the final filtered comment data.

If the first check has already resulted in a `trash` or `spam` status, the second check is skipped as redundant.

Follow-up to [2894], [3851], [48121], [48575].

Props cfinke, kbrownkd, thompsonsj, mi5t4n, devspace, chaion07, engahmeds3ed, SergeyBiryukov.
Fixes #61827.
Built from https://develop.svn.wordpress.org/trunk@59267


git-svn-id: http://core.svn.wordpress.org/trunk@58659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 23:07:15 +00:00
Peter Wilson 5284afbd22 Help/About: Update version name in performance string.
Updates the version from `6.7` to `WordPress 6.7` in the performance string for consistency with other mentions on the about page.

Props ryelle, peterwilsoncc.
See #61961.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 22:40:17 +00:00
joedolson 4b347a2e56 Menus: A11y: Set the parent and order using select fields.
Add `select` inputs to allow users to set the parent and position of items in the menu settings. Fixes a significant problem for screen reader users that makes updating menus extremely tedious, since the options for moving items do not explicitly set a position. This is also a significant improvement for all users manipulating large menus.

This could easily be considered an enhancement, but while it is a minor enhancement for most users, it is transformative for screen reader users in managing menus, moving that interface from nearly unusable to very manageable.

Props javad2000, audrasjb, juliemoynat, williamalexander, rcreators, milamj, joedolson. 
Fixes #43305.
Built from https://develop.svn.wordpress.org/trunk@59265


git-svn-id: http://core.svn.wordpress.org/trunk@58657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 19:55:16 +00:00
Pascal Birchler bdea1930c7 I18N: Fix script languages path on Multisite.
This is a follow-up to [59126] (itself a follow-up to [57922]), which caused a regression when determining the right path when loading script translations.

Props swissspidy, themes-1, staurand.
Fixes #62016.
Built from https://develop.svn.wordpress.org/trunk@59264


git-svn-id: http://core.svn.wordpress.org/trunk@58656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 14:13:14 +00:00
get_dave 224824fb85 Editor: Update packages for 6.7 RC 1.
Syncs @wordpress/* packages to the wp-6.7 npm tag.

Props get_dave, kevin940726, rejaulalomkhan.

Fixes #62263
Built from https://develop.svn.wordpress.org/trunk@59263


git-svn-id: http://core.svn.wordpress.org/trunk@58655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 11:23:29 +00:00
ramonopoly 339ee19db1 Theme JSON: remove redundant styles check and relocate $selectors assignment.
In `WP_Theme_JSON::get_block_nodes()`, remove redundant check for `$theme_json['styles']`, which means `WP_Theme_JSON::get_blocks_metadata()` is only called if necessary.

Also skip unnecessary `$selector` assignment if only nodes are to be returned.

Props ramonopoly, mukesh27.  
Fixes #62234.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 04:48:16 +00:00
Peter Wilson b571e7c6f1 Taxonomy: Remove count argument from `WP_Term_Query` docs.
The DocBlock of `WP_Term_Query::__construct` mentions the count argument, however, this argument is not supported in `WP_Term_Query::get_terms()`.

Props sergeybiryukov, swissspidy, snehapatil02, tyrannous.
Fixes #61094.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-21 01:22:17 +00:00
Peter Wilson 5cdf55fda7 Editor: Load all style variation fonts within the editors.
Loads the font family files from style variations defined within a theme for user in the site and post editors. This is to ensure the fonts are shown while editing without the need for a reload after switching styles.

Props ironprogrammer, mmaattiiaass.
Fixes #62231.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-20 23:25:16 +00:00
Sergey Biryukov a67b37192f Editor: Replace `id` attribute with `class` in `WP_Font_Face::get_style_element()`.
`wp_print_font_faces()` prints an HTML tag that can be used more than once, so the document could end up having multiple tags with the same `id` attribute.

The `id` global attribute defines an identifier (ID) which must be unique in the whole document.

Reference: [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id MDN Web Docs: id].

Follow-up to [56500].

Props mmaattiiaass, peterwilsoncc.
Fixes #62246.
Built from https://develop.svn.wordpress.org/trunk@59259


git-svn-id: http://core.svn.wordpress.org/trunk@58651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-20 13:13:15 +00:00
Sergey Biryukov 05b4e2e094 Docs: Fix typo in a comment in `WP_Rewrite::refresh_rewrite_rules()`.
Includes adjusting the method DocBlock per the documentation standards.

Follow-up to [56448].

See #61608.
Built from https://develop.svn.wordpress.org/trunk@59258


git-svn-id: http://core.svn.wordpress.org/trunk@58650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-19 23:54:18 +00:00
Andrew Ozz e52423e435 Upgrade/Install: Return WP_Error when source files cannot be found.
Fixes a fatal error in `array_keys()` (PHP 8.0+) as `$wp_filesystem->dirlist()` will return `false` when the source directory doesn't exist or becomes unreadable for some reason.

Props: verygoode, lifelightweb, da5f656f, costdev, afragen, azaozz
Fixes #61114
Built from https://develop.svn.wordpress.org/trunk@59257


git-svn-id: http://core.svn.wordpress.org/trunk@58649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 23:37:20 +00:00
Joe McGill 5c8c27b24b Editor: Cache global styles for blocks.
This caches the generated CSS from block nodes in merged Theme JSON data to avoid repeated costly operations required to compute style properties for blocks. The generated CSS is saved to a transient that expires every hour.

This is a follow-up that reimplements [58334], which was previously reverted in [58710].

Props thekt12, spacedmonkey, pereirinha, mukesh27, isabel_brison, oandregal, andrewserong, ramonjd, joemcgill, costdev, aaronrobertshaw, peterwilsoncc.
Fixes #61679. See #59595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 21:55:18 +00:00
Sergey Biryukov 51868a5e8c Pings/Trackbacks: Validate that the specified charset is available on the receiving site.
This aims to avoid a subsequent fatal error from `mb_convert_encoding()` when an invalid charset is specified.

Follow-up to [1734], [2563], [12032].

Props dd32, jrf, oglekler, rajinsharwar.
Fixes #60261.
Built from https://develop.svn.wordpress.org/trunk@59255


git-svn-id: http://core.svn.wordpress.org/trunk@58647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 15:56:18 +00:00
desrosj 4725c28e34 Build/Test Tools: Refine `paths` filter for workflows part 2.
[59252] made the path filtering a bit too broad for the Test Old Branches workflow.

Though `v3` of the reusable PHPUnit workflow is used by some older branches, this version is updated much more frequently because it’s the latest version.

To limit the number of times this workflow runs, old branches should only be tested when old versions of the workflow are updated.

Follow up to [59252].

See #61564.
Built from https://develop.svn.wordpress.org/trunk@59254


git-svn-id: http://core.svn.wordpress.org/trunk@58646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 15:20:14 +00:00
Joe McGill dd274216f1 Editor: Improve performance of WP_Theme_JSON::compute_style_properties
This improves the logic in `WP_Theme_JSON::compute_style_properties` to address a number of performance issues.

Props spacedmonkey.
Fixes #59595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 14:26:20 +00:00
desrosj bb1f4f1f80 Build/Test Tools: Refine `paths` filter for workflows.
Some GitHub Action workflows use the `paths` filter to limit when workflows run for pull requests. This helps avoid running workflows unnecessarily when the pull request does not change any relevant code.

Currently, a few of these workflows are configured to run when any `.yml` file in the `.github/workflows/` directory is changed. This updates those workflows to target more specific workflow files for more efficient running.

See #61564.
Built from https://develop.svn.wordpress.org/trunk@59252


git-svn-id: http://core.svn.wordpress.org/trunk@58644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 14:02:19 +00:00
desrosj e4517c21a9 Build/Test Tools: Add input for PHPUnit test group.
This adds a `phpunit-test-goups` input to the reusable PHPUnit test workflow for added flexibility.

When passed, only the specified test groups are run.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 13:39:18 +00:00
gziolo a923a561ca HTML API: Fix the position update after changing the modifiable text when length differs
There was an edge case detected for updating the text placed without the wrapping HTML tag with `set_modifiable_text`.

Props gziolo, jonsurrell.
Fixes #62241.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 13:31:17 +00:00
desrosj 4bc546e7f5 Build/Test Tools: Change commands used for the copying `.env.example` file.
This switches from using the `test`/`cp` commands when copying the `.env.example` file to using `node:fs`. `test` and `cp` are not available on Windows machines.

This also adds the `.env` file to the `svn:ignore` list to prevent it from being committed accidentally.

Follow up to [59038].

Props afercia, Clorith, poena.
Fixes #52668.
Built from https://develop.svn.wordpress.org/trunk@59249


git-svn-id: http://core.svn.wordpress.org/trunk@58641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-18 12:37:20 +00:00
Bernhard Reiter 1dbf1ddc5a HTML API: Ensure form closer tokens are reachable.
Form tag closers have complicated conditions. There was a bug where the HTML Processor would not stop correctly on a FORM tag closer token.
This changeset ensures that that token is reachable.

Developed in https://github.com/WordPress/wordpress-develop/pull/7582
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58779].

Props jonsurrell.
Fixes #61576.
Built from https://develop.svn.wordpress.org/trunk@59248


git-svn-id: http://core.svn.wordpress.org/trunk@58640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-17 17:48:19 +00:00
Adam Silverstein e0d47a45b1 Media: Ensure Imagick quality is set correctly.
Fix an issue where Imagick did not properly set image quality for AVIF images. Adds a call to `setCompressionQuality`  where we currently call `setImageCompressionQuality`

Props: jamesosborne, adamsilverstein, mukeshpanchal27.

Fixes: #61614.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-17 17:05:18 +00:00
Sergey Biryukov bd1a653f42 External Libraries: Upgrade PHPMailer to version 6.9.2.
This is a maintenance release with minor bug fixes.

References:
* [https://github.com/PHPMailer/PHPMailer/releases/tag/v6.9.2 PHPMailer 6.9.2 release notes]
* [https://github.com/PHPMailer/PHPMailer/compare/v6.9.1...v6.9.2 Full list of changes in PHPMailer 6.9.2]

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427], [54937], [55557], [56484], [57137].

Props ayeshrajans.
Fixes #62206.
Built from https://develop.svn.wordpress.org/trunk@59246


git-svn-id: http://core.svn.wordpress.org/trunk@58638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-17 11:31:12 +00:00
cbravobernal cc5e9ffb43 HTML API: Fix typo in error message in html processor.
Possesive "it's" should be "its."

Follow-up to [59076].

Props jonsurrell.
Fixes #62036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-17 11:03:17 +00:00
Peter Wilson 3c5699206b Bundled Themes: Avoid loading translations too early.
Load block patterns for bundled themes on the `init` hook to avoid triggering notices caused by loading the translations too early.

The change is applied to Twenty Ten, Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen and Twenty Twenty.

Props domainsupport, swissspidy.
Fixes #62237.
See #44937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-17 00:37:17 +00:00
Sergey Biryukov 172d5084a4 Tests: Correct test class name for `rss_enclosure()` as per the naming conventions.
Includes:
* Moving `@covers` tags to the class-level DocBlock, since this is the only function tested in the class.
* Adjusting the assertion messages for clarity, as `rss_enclosure()` does not return anything directly.
* Using a static closure for improved performance.

Follow-up to [59241].

See #61530.
Built from https://develop.svn.wordpress.org/trunk@59243


git-svn-id: http://core.svn.wordpress.org/trunk@58635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-16 14:19:16 +00:00
Peter Wilson 9668bc0839 Networks and Sites: Relocate defintion of `absint()`.
Relocate the defintion of `absint()` to `load.php` to allow it to be available to `get_current_blog_id()` and `get_current_network_id()`. These functions may be called by caching drop-ins, prior to the loading of `functions.php`.

Props flixos90, geekofshire, johnjamesjacoby, sergeybiryukov, wonderboymusic.
Fixes #40682.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 23:41:16 +00:00
Peter Wilson d30cc780fd Feeds: Validate enclosures prior to generating tags.
Prevent possible PHP warnings caused by malformed enclosure meta data. This change ensures the enclosure meta data has at least three lines of text before generating the tag in `rss_enclosure()`.

Props arypneta, johnjamesjacoby, nihar007, rahmohn, rghedin, zahardoc.
Fixes #58798.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 22:24:18 +00:00
Sergey Biryukov 0d6d21f9a9 Docs: Slightly adjust the description for `$table_prefix` in `wp-config-sample.php`.
This replaces the DB abbreviation for consistency, and aims to make the sentence a bit more clear.

Follow-up to [59044].

See #34189.
Built from https://develop.svn.wordpress.org/trunk@59240


git-svn-id: http://core.svn.wordpress.org/trunk@58632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 15:24:17 +00:00
cbravobernal f3e8c615c8 Block Bindings: Fix panel not appearing in custom post types.
There is a bug where the attributes panel is not shown in custom post types. This is caused because each post type can define a capability_type, which by default is post, so the logic to map the capabilities wasn't correct and it was returning false.

Props santosguillamot, cbravobernal.
Fixes #62226.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 14:13:19 +00:00
gziolo 4988a70658 Editor: Bootstrap block binding sources with inline script from server
Bootstrap block bindings sources earlier in the process through an inline script to ensure they are available when developers want to extend them in the client. Following the same pattern other APIs like registering block types are doing.

Props santosguillamot, cbravobernal, gziolo.
Fixes #6225.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 08:52:17 +00:00
Peter Wilson 72b05d5d14 Post WordPress 6.7 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@59237


git-svn-id: http://core.svn.wordpress.org/trunk@58629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 00:28:17 +00:00
Peter Wilson 11b364fbff WordPress 6.7 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@59236


git-svn-id: http://core.svn.wordpress.org/trunk@58628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-15 00:10:22 +00:00
Peter Wilson f5c1486c99 Media: Account for post ID queries in `update_post_thumbnail_cache()`.
Updates `update_post_thumbnail_cache()` to account for `WP_Query` objects that only contain the post ID field rather than the entire post object.

This changes passes the `$post` value to `get_post_thumbnail_id()` rather than assuming the presence of the ID property. Additionally, the posts to which the thumbnail is attached are now primed prior to calling the function to avoid numerous unnecessary database queries.

The test `WP_Test_REST_Posts_Controller::test_get_items_primes_parent_post_caches()` is modified to account for an order of operations change for the priming of post meta caches. The cache is no longer primed in the final call to `update_meta_cache()` so the tests need to account for the post meta to be primed in any call to the function.

Props antpb, jorbin, khokansardar, linsoftware, mukesh27, oglekler, rajinsharwar, sumitsingh, xendo.
Fixes #59521.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 22:22:10 +00:00
ryelle 940e899c7d Help/About: Update the About page for 6.7.
Introducing the new content for the 6.7 About page. As with the last release, this About page has a simple layout, and links off to WordPress.org for a full overview.

Props ndiego, annezazu, provenself, ryelle, joen, parinpanjari.
See #61961.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 22:06:13 +00:00
Peter Wilson 4100458c7d Bundled Themes: Update Twenty Twenty-Five for 6.7 Beta 3.
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into `trunk` for 6.7 beta 3.

A full list of changes can be found on GitHub: [0d8b245021...5d17f41da8 WordPress/twentytwentyfive@0d8b245...5d17f41]

Props annezazu, areziaal, beafialho, cwhitmore, franz00, get_dave, joedolson, joen, juanfra, karmatosed, kartikmehta, mukesh27, onemaggie, pgeorgiev, poena, richtabor, sudipatel007, sumitbagthariya16, wildworks, youknowriad.
Fixes #62218.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 21:58:17 +00:00
Sergey Biryukov 12f5686f77 Users: Further adjust the check for `use_ssl` meta in `wp_insert_user()`.
This removes a redundant check for a falsey value, which is equivalent to the `empty()` check directly before.

Includes minor adjustments in the unit test:
* Adding a `@covers` tag.
* Correcting the description for clarity.
* Using `assertSame()` for strict type checking.

Follow-up to [59216].

See #60299.
Built from https://develop.svn.wordpress.org/trunk@59232


git-svn-id: http://core.svn.wordpress.org/trunk@58624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 21:16:17 +00:00
desrosj da2f8d9cc6 Build/Test Tools: Move `composer update` to `env:start`.
Currently, `composer update` is run whenever `test:php` is called to ensure the latest versions of `yoast/phpunit-polyfills` and other dependencies are always installed when running the PHPUnit test suite. 

For contributors using the local Docker environment to run tests during development, this is unnecessary and can often result in a 30+ second delay every time `test:php` is called.

This moves the command to `env:install`, reducing the number of times `composer update` is run from many to once. Since the environment needs to be started in order to run tests, `env:install` will still confirm that the latest versions of required dependencies are installed and available prior to running the test suite.

Props azaozz, swissspidy, johnbillion, peterwilsoncc, hellofromtonya.
Fixes #57189.
Built from https://develop.svn.wordpress.org/trunk@59231


git-svn-id: http://core.svn.wordpress.org/trunk@58623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 12:38:17 +00:00
kevin940726 decedc1b93 Editor: Update packages for 6.7 Beta 3.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Fixes #62205.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 11:47:24 +00:00
Pascal Birchler 1c45d548c4 Sitemaps: Add missing `_deprecated_function()` call to newly deprecated method.
Follow-up to [59228].

See #61931.
Built from https://develop.svn.wordpress.org/trunk@59229


git-svn-id: http://core.svn.wordpress.org/trunk@58621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 08:52:12 +00:00
Pascal Birchler 7d9a297eb4 Sitemaps: Improve `sitemap.xml` redirects when using custom permalinks.
Changes the way redirects from `sitemap.xml` to `wp-sitemap.xml` happen, so that they also work when using a more complex custom rewrite structure.

Props gmariani405, swissspidy, euthelup, peterwilsoncc.
Fixes #61931.
Built from https://develop.svn.wordpress.org/trunk@59228


git-svn-id: http://core.svn.wordpress.org/trunk@58620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 08:49:19 +00:00
Peter Wilson b99b8161e4 Bundled Themes: Test new themes are added to new bundled files.
Introduces a test to ensure that new bundled themes are included in the `$_new_bundled_files` array. Modifies previous theme related tests added during the 6.7 release cycle to include the correct annotations.

Props peterwilsoncc, mukesh27, costdev.
See #61530, #62103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-14 01:07:15 +00:00