Commit Graph

37554 Commits

Author SHA1 Message Date
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
joedolson f17a0e2aee Bundled Theme: Twenty Eleven: Fix positioning to make links clickable in mobile.
Fix a combination of floated and absolutely positioned content that caused previous and next links to be stacked under other content, making them unclickable on mobile devices. Adjust the position of the post date so that focus order matches visible order. Prevent overlap of 'Edit' button on post title.

Props kel-dc, parthvataliya, dhruvang21, sabernhardt, wpeople, itpathsolutions, balub, dilip2615, tirth03. 
Fixes #62008.
Built from https://develop.svn.wordpress.org/trunk@59226


git-svn-id: http://core.svn.wordpress.org/trunk@58618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-13 21:22:15 +00:00
joedolson 0c88366123 Revisions: Improve accessibility of revisions selection.
Add `aria-labelledby` and `aria-describedby` attributes to revision slider selection handle. Add keyboard `:focus` state to revision slider  handle. Move 'multiple revision' checkbox before the buttons panel, matching its visual order. Change diff `Title` and `Content` headings from `h3` to `h2` to correct headings hierarchy.

Props joedolson, rishishah, sarahricker, williamalexander, afercia. 
Fixes #52303.
Built from https://develop.svn.wordpress.org/trunk@59225


git-svn-id: http://core.svn.wordpress.org/trunk@58617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-13 20:49:13 +00:00
joedolson f7fb13a3c4 Administration: A11y: Fix accordion accessibility.
Change accordions in the customizer and the navigation menus to make proper usage of accordion markup patterns. This includes adding missing `:focus` states, using a `button` element to control tabbing and interaction, instead of the heading elements, and removing instructional text for screen reader users that was used to compensate for the incorrect markup pattern.

Props afercia, rishishah, kushang78, rcreators, krupajnanda, hmbashar, joedolson.
Fixes #42002.
Built from https://develop.svn.wordpress.org/trunk@59224


git-svn-id: http://core.svn.wordpress.org/trunk@58616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-13 19:09:12 +00:00
Sergey Biryukov c0dc2960e4 Docs: Fix typos in a comment in `wp_default_script_modules()`.
Follow-up to [59083].

Props shailu25.
Fixes #62213.
Built from https://develop.svn.wordpress.org/trunk@59223


git-svn-id: http://core.svn.wordpress.org/trunk@58615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-13 18:49:16 +00:00
Tammie Lister a1bd872c12 Twenty Nineteen: Fixes adjusting avatar dimensions for comment author.
In Twenty Nineteen r58580 increased size of avatars. This caused issues with the position of author checkbox. This resolves by moving without impacting the avatar blocks.

Props sabernhardt, nithins53, sudipatel007.
Fixes #62096.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-13 15:43:18 +00:00
desrosj fb115f6a01 Build/Test Tools: Add input for Gutenberg version to E2E workflow.
The E2E test suite has some basic tests to confirm that the plugin can be activated without conflicts. This works great until the minimum version of WordPress required to run the plugin is raised. Old branches that attempt to run these tests that are newly incompatible with the latest version of the plugin will fail.

This change adds a `gutenberg-version` input to the E2E GitHub Action workflow to allow these tests to continue running with the last compatible version.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-12 13:16:12 +00:00
Sergey Biryukov c803f6d3e0 Twenty Ten: Document the `$css` parameter in `twentyten_remove_gallery_css()`.
Follow-up to [13012], [13128], [13157], [13552], [13885], [13886].

Props parthvataliya.
Fixes #62183.
Built from https://develop.svn.wordpress.org/trunk@59219


git-svn-id: http://core.svn.wordpress.org/trunk@58612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-12 11:59:19 +00:00
Sergey Biryukov bdb722eed7 Twenty Nineteen: Document the `$defaults` parameter in `twentynineteen_comment_form_defaults()`.
Follow-up to [43808].

Props parthvataliya.
See #62183.
Built from https://develop.svn.wordpress.org/trunk@59218


git-svn-id: http://core.svn.wordpress.org/trunk@58611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-11 22:26:15 +00:00
Joe McGill 8ec0909243 Build/Test Tools: Fix Performance Test workflows on release branches.
This fixes an issue after [59170] that was causing the Performance Test workflows to fail on older branches since the `CODEVITALS_PROJECT_TOKEN` input value was marked as required but was not being passed.

This is a follow-up to [59214] and [59215].

Fixes #62153.
Props desrosj, joemcgill, flixos90, swissspidy.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-11 19:04:14 +00:00
Adam Silverstein 6f656ab4e5 Users: remove unnecessary writes to the database for use_ssl user meta.
When checking for updates to use_ssl, use strings for the comparison values, matching the stored values. Fixes an issue where calls to wp_update_user updated the database meta value for use_ssl even when the value was missing or unchanged. 

Props prettyboymp, rajinsharwar, adamsilverstein, johnbillion, rayhatron, mukesh27, joemcgill.

Fixes #60299.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-11 17:20:14 +00:00
Joe McGill 6432da4794 Build/Test Tools: Revert [59214].
The commit caused the Performance Tests workflow to fail due to an invalid workflow file.

See #62153.
Unprops @joemcgill.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-11 16:48:15 +00:00
Joe McGill fdcb9f2613 Build/Test Tools: Fix Performance GH workflows on release branches.
This fixes an issue after [59170] that was causing the Performance release workflows to fail on older branches since the `CODEVITALS_PROJECT_TOKEN` input value was marked as required but was not being passed.

Fixes #62153.
Props desrosj, joemcgill, flixos90.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-11 15:57:17 +00:00
Felix Arntz d7fd9dc225 Themes: Improve performance of applying background image styles in `theme.json`.
The cost of using `WP_Theme_JSON::get_block_nodes()` for this in its original shape was high enough to lead to a performance regression. Therefore this changeset introduces a new option on the method that allows to bypass all logic except for retrieving the node paths, which is much faster and everything that this functionality needs.

Follow up to [58936].

Props mukesh27, flixos90, ramonopoly, joemcgill, andrewserong, swissspidy.
Fixes #61858.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 21:07:19 +00:00
Sergey Biryukov 2234d91da2 Twenty Fourteen: Document the `$args` parameter in `Featured_Content::hide_featured_term()`.
Follow-up to [25808], [26556], [28536].

Props parthvataliya.
See #62183.
Built from https://develop.svn.wordpress.org/trunk@59210


git-svn-id: http://core.svn.wordpress.org/trunk@58605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 18:01:11 +00:00
desrosj c99ed6156f Build/Test Tools: Temporarily ignore Slack failures.
When many workflows are initiated at the same time, there are often instances where the requests to Slack providing updates are rate limited. This usually happens when the Test Old Branches workflow runs and initiates testing for all workflows in branches that could potentially receive a security update.

Even though everything was successful in the workflow except the message, the workflow run is marked as failed. The next time the same workflow runs for that branch, a “fixed” message will be sent to `#core` in Slack. The result is a burst of messages that is quite noisy and unnecessary.

This temporarily adds `continue-on-error` to the jobs responsible for sending the messages until a better solution can be decided on.

See #61701.
Built from https://develop.svn.wordpress.org/trunk@59209


git-svn-id: http://core.svn.wordpress.org/trunk@58604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 17:58:11 +00:00
desrosj 3d3805b478 Build/Test Tools: Update 3rd-party GitHub Actions.
This applies several updates to the following 3rd-party GitHub Actions:
- `actions/setup-node`
- `actions/cache`
- `actions/upload-artifact`
- `slackapi/slack-github-action`
- `codecov/codecov-action`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 17:10:15 +00:00
desrosj 5b4733aea7 Build/Test Tools: Configure npm to `prefer-dedupe`.
`npm dedupe` is a command that attempts to simplify the structure of the local package tree by moving dependencies higher up. This allows for more effective package sharing, less transfer, and smaller `node_modules` folders.

This change configures npm to `prefer-dedupe` by default so that these benefits persist and the command is not required to be run regularly.

This also brings better alignment with the Gutenberg repository, which has already configured `prefer-dedupe`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 15:58:22 +00:00
desrosj 24ebcea8b8 Build/Test Tools: Update npm lockfile to version 3.
This updates the `package-lock.json` file to use the version 3 format.

Version 3 removes the version 1 format data, resulting in a smaller file. While version 3 format is not supported in npm < 7, a lower limit is enforced in the `engines` declaration within `package.json` and has been >= 7 since [56378].

The Gutenberg repository has already been updated to use version 3.

Props jonsurrell.
See #62190.
Built from https://develop.svn.wordpress.org/trunk@59206


git-svn-id: http://core.svn.wordpress.org/trunk@58601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 13:24:12 +00:00
desrosj d4ffbfa50c Build/Test Tools: Revert [59204].
The changeset had an incomplete commit message.

Unprops desrosj.
See #62190.
Built from https://develop.svn.wordpress.org/trunk@59205


git-svn-id: http://core.svn.wordpress.org/trunk@58600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 13:16:17 +00:00
desrosj 5643efebea Build/Test Tools: Update npm lockfile to version 3.
This updates the `package-lock.json` file to use version 3 

Props jonsurrell.
See #62190.
Built from https://develop.svn.wordpress.org/trunk@59204


git-svn-id: http://core.svn.wordpress.org/trunk@58599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 12:59:17 +00:00
John Blackbourn 7a41e769ec REST API: Correct the opening tag for this method's docblock.
Props szepeviktor

See #61608

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


git-svn-id: http://core.svn.wordpress.org/trunk@58598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-10 11:54:15 +00:00
Peter Wilson 5cbec1348b Media: Update file size meta data when editing images.
Fixes an error in which the file size meta data retained the original upload's values follow a user editing the images in the media screen.

The original images' file sizes are now stored in the backup image data to allow for them to be restored when a user restores the original image.


Props ankit-k-gupta, antpb, audrasjb, chaion07, gauravsingh7, joedolson, oglekler, pls78, rajinsharwar, sayedulsayem, vertisoft.
Fixes #59684.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-09 23:32:21 +00:00
Peter Wilson a74b414813 Editor: Remove prefix from `wp_(un)register_block_template()` functions.
Removes the `wp_` prefix from block template registration functions for consistency with other block related registration functions.

* `wp_register_block_template()` becomes `register_block_template()`.
* `wp_unregister_block_template()` becomes `unregister_block_template()`.

Props aljullu, aristath, youknowriad, swissspidy.
Fixes #62193.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-09 22:11:16 +00:00
Sergey Biryukov 70bfe13aa0 Twenty Eleven: Document the `$instance` parameter in Ephemera widget form.
Follow-up to [17669], [25625].

Props parthvataliya.
See #62183.
Built from https://develop.svn.wordpress.org/trunk@59200


git-svn-id: http://core.svn.wordpress.org/trunk@58595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-09 20:17:18 +00:00
andrewserong f53eb5b29b Editor: Fix writingMode support in dynamic blocks.
Adds missing handling for the `typography.writingMode` property to the style engine, so that dynamic blocks correctly render text orientation styles on the site frontend.

Props wildworks, aaronrobertshaw, poena, get_dave, ndiego.
Fixes #62189.
See #59306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-09 01:28:13 +00:00
John Blackbourn 324f713adf Role/Capability: Introduce the `current_user_can_for_site()` and `user_can_for_site()` functions.
The `current_user_can_for_site()` function is a replacement for `current_user_can_for_blog()` which is now deprecated. `user_can_for_site()` is a renaming of the `user_can_for_blog()` function which was introduced in [59123]. The intention of this change is to prevent the introduction of a new function which uses the old "blog" naming structure.

Props swissspidy, spacedmonkey, flixos90, johnjamesjacoby

Fixes #45197

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


git-svn-id: http://core.svn.wordpress.org/trunk@58593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-08 22:32:09 +00:00
Aaron Jorbin 58c1f27c40 Customizer: Do not force users to go through the cropping flow if the image is the correct ratio.
If a user uploads an 800x800 image and a 512x512 image is required, then they should be allowed to skip cropping. This still creates the correct crop behind the scenes but simplifies the flow a bit for users.

Props nirajgirixd, celloexpressions, westonruter, azaozz, jorbin.
Fixes #36441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-08 22:29:21 +00:00
Sergey Biryukov 94bd76c77d Docs: Synchronize description for the `$instance` parameter in `WP_Widget` methods.
Follow-up to [30382].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-08 18:39:16 +00:00
Peter Wilson 679ee27228 Post WordPress 6.7 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@59195


git-svn-id: http://core.svn.wordpress.org/trunk@58590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-08 00:43:16 +00:00
Peter Wilson a49bf5596f WordPress 6.7 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@59194


git-svn-id: http://core.svn.wordpress.org/trunk@58589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-08 00:08:18 +00:00
Peter Wilson 99474f16b6 Docs/Bundled Themes: Add `@since` annotation for introduction of TT5.
See #62180, #61608.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 22:28:15 +00:00
Peter Wilson a13d535628 General: Memoize the return value in `wp_get_wp_version()`.
Cache the unmodified `$wp_version` value as a static. This retains the current behaviour during the upgrade process `$wp_version` referencing the version of WordPress being upgraded from.

Follow up to [58848].

Props Cybr, debarghyabanerjee, mukesh27, costdev, SergeyBiryukov, TobiasBg, desrosj, azaozz.
Fixes #61782.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 21:13:16 +00:00
desrosj 8410b2fc26 Twenty Twenty-Five: Merge the latest improvements for Beta 2.
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into `trunk` for 6.7 beta 2.

A full list of changes can be found on GitHub: https://github.com/WordPress/twentytwentyfive/commits/trunk/?since=2024-10-01&until=2024-10-07.

Props poena, mukesh27, jonnywatersbb, cliffralessio, afercia, samtoohey93, codersantosh, carstenbach, gohelkunjan, ryelle, aaronrobertshaw, wildworks, yukinobu, audrasjb, mdviralsampat, hanneslsm, ddewan, greenshady, joedolson, areziaal, alaminfirdows, kartikmehta, cwhitmore.
Fixes #62180.
Built from https://develop.svn.wordpress.org/trunk@59191


git-svn-id: http://core.svn.wordpress.org/trunk@58586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 18:09:21 +00:00
Sergey Biryukov 8e1deb921c Docs: Fix typo in a comment in `WP_Customize_Control::render_control()`.
Follow-up to [38906].

Props nithins53, nithi22, mukesh27, jdahir0789.
Fixes #62186.
Built from https://develop.svn.wordpress.org/trunk@59190


git-svn-id: http://core.svn.wordpress.org/trunk@58585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 17:48:20 +00:00
Joe McGill 804c3d0416 Media: Cache the results of _wp_image_editor_choose.
This saves the `WP_Image_Editor` implementation that supports the queried options to a cache to avoid performing redundant compatibility checks, which can be expensive. For example, `WP_Image_Editor_Imagick::supports_mime_type()` can get called in the editor multiple times to determine which image formats can be supported during `wp_plupload_default_settings()`. 

With this cache, the support will be stored for 1 day, speeding up loading times for the editor. This also introduces a new global caching group, `image_editor` to manage any subsequent caches that are related to image editor optimizations.

Props joemcgill, desrosj, westonruter, flixos90, adamsilverstein, mukesh27, joehoyle.
Fixes #61532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 17:13:14 +00:00
joedolson 12cf82f950 Editor: A11y: Fix tab order, state, and focus in classic editor.
Remove code that forced focus to skip from the title field to the editor. Add link to skip to editor to give the user control over their path. Set `aria-pressed` on editor selector buttons to communicate which editor is enabled. Make focus state visible on unselected editor button. Remove `wp_keep_scroll_position` flag used for IE compatibility. Add `role="presentation"` to table used as status info bar.

This addresses a long-standing accessibility problem in the classic editor which created a confusing keyboard navigation path by skipping all content between the title field and the content editor.

Props afercia, rcreators, benjamin_zekavica, sharonaustin, joedolson.
Fixes #29838.
Built from https://develop.svn.wordpress.org/trunk@59188


git-svn-id: http://core.svn.wordpress.org/trunk@58583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 16:57:16 +00:00
Peter Wilson 42db398596 Media: Hide "copied" tooltip once another URL is copied to the clipboard.
On the media grid view, hide the copied tooltip when a subsequent URL is copied to the clipboard. This prevents tooltips from remaining displayed if a user copies multiple URLs within a three second period.

Props antpb, debarghyabanerjee, jayadevankbh, sabernhardt.
Fixes #60082.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 02:49:17 +00:00
Peter Wilson 654b12c21e Tests/Build Tools: Improve tests for bundled themes.
Introduce two new tests relating to bundled themes:

1. Ensure the list of tested themes matches the list of themes defined in `WP_Theme`
2. Ensure the run time value of `WP_DEFAULT_THEME` is included in the list of themes defined in `WP_Theme`

See #61530.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-07 00:37:18 +00:00
Peter Wilson 2ebd04a8ad Tests/Build Tools: Update SCSS files to use new color functions.
Replaces deprecated color functions with their updated equivalents, see [https://sass-lang.com/documentation/breaking-changes/color-functions/ the deprecation documentation].

This results in four changes in the built files, `hsl` colors with a negative lightness value are replaced with the keyword `black`. These changes are harmless as they have no effect on the rendered colors.

Props aslamdoctor, veryard.
Fixes #62142.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-06 23:37:15 +00:00
noisysocks 740dc9cf12 Editor: Update packages for 6.7 Beta 2.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Fixes #62179.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-06 22:45:30 +00:00
Sergey Biryukov 6c4dd50e88 Coding Standards: Use strict comparison in `wp_list_comments()`.
Follow-up to [8962], [9296], [9424], [34735], [36157].

Props deepakrohilla, sabernhardt, aristath, poena, afercia, SergeyBiryukov.
Fixes #62169. See #61607.
Built from https://develop.svn.wordpress.org/trunk@59183


git-svn-id: http://core.svn.wordpress.org/trunk@58578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-06 16:56:19 +00:00
Andrew Ozz d13435cc58 Docs: Fix note about not using new functions in `update-core.php` and `class-core-upgrader.php`.
Props costdev.
See #62165.
Built from https://develop.svn.wordpress.org/trunk@59182


git-svn-id: http://core.svn.wordpress.org/trunk@58577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 23:25:12 +00:00
joedolson 449c91edb7 Comments: Enable using `reply_to_text` as visible link.
Add an option `show_reply_to_text` as an option to use the current `aria-label` attribute on comment reply links as the visible link. If used, remove the `aria-label`. Also add documentation of the `reply_to_text` parameter to the function documentation.

Props halilesen, sabernhardt, snehapatil02, jainil07, joedolson.
Fixes #59965.
Built from https://develop.svn.wordpress.org/trunk@59181


git-svn-id: http://core.svn.wordpress.org/trunk@58576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 23:04:11 +00:00
Andrew Ozz 847bac4a16 General: Do not use the new `wp_get_wp_version()` in `update-core.php` and `class-core-upgrader.php`.
All functions that are used there must be present in both the previous version being upgraded from, and the later version that's being installed (e.g. when rolling back Core) as these files are used in both.

Props djennez, SergeyBiryukov, jorbin, peterwilsoncc, azaozz.
Fixes #62165.
See 61627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 22:51:16 +00:00
joedolson 22e082f627 Menus: Remove redundant `title` attributes.
Omit `title` attributes if they are defined but are the same text as the menu item title, either before or after filtering. If a navigation menu filter makes significant changes to the menu title without changing the title attribute, this will still remove them. The cases where this occurs and the title attribute is still a useful value will be very uncommon, however.

Props hareesh-pillai, audrasjb, sabernhardt, afercia, sergeybiryukov, tirth03, joedolson.
Fixes #51299.
Built from https://develop.svn.wordpress.org/trunk@59179


git-svn-id: http://core.svn.wordpress.org/trunk@58574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 22:31:09 +00:00
joedolson 80bc458694 Revert [59177].
This was the wrong version of the patch.

Unprops @joedolson.
Built from https://develop.svn.wordpress.org/trunk@59178


git-svn-id: http://core.svn.wordpress.org/trunk@58573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 22:29:19 +00:00
joedolson ebe4e43d1c Menus: Remove redundant `title` attributes.
Omit `title` attributes if they are defined but are the same text as the menu item title, either before or after filtering. If a navigation menu filter makes significant changes to the menu title without changing the title attribute, this will still remove them. The cases where this occurs and the title attribute is still a useful value will be very uncommon, however.

Props hareesh-pillai, audrasjb, sabernhardt, afercia, sergeybiryukov, tirth03, joedolson.
Fixes #51299.
Built from https://develop.svn.wordpress.org/trunk@59177


git-svn-id: http://core.svn.wordpress.org/trunk@58572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 22:10:17 +00:00
dmsnell c729cbf501 WP_Debug_Data: Extract `wp-themes` data into separate methods.
This is the last part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other.

This patch separates the findal set of twelve groups, the `wp-active-theme`, `wp-parent-theme`, and `wp-themes-inactive` info, into a separate methods focused on those data.

This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7507
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
Fixes #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 19:23:15 +00:00
dmsnell f2282f68c0 WP_Debug_Data: Extract `wp-paths-sizes` data into separate methods.
This is the tenth part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other.

This patch separates the eleventh of twelve groups, the `wp-paths-sizes` info, into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7445
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 16:28:14 +00:00
dmsnell 761869935d WP_Debug_Data: Extract `wp-core` data into separate methods.
This is the ninth part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other.

This patch separates the tenth of twelve groups, the `wp-core` info, into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7357
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 15:59:17 +00:00
Sergey Biryukov b970720c83 Twenty Sixteen: Fix PHPCS issues.
There must be exactly one blank line after the file comment.

Follow-up to [40851].

Props pitamdey, umeshsinghin, sabernhardt, mukesh27, nithins53, deepakrohilla, viralsampat.
Fixes #62160.
Built from https://develop.svn.wordpress.org/trunk@59173


git-svn-id: http://core.svn.wordpress.org/trunk@58568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 09:45:17 +00:00
dmsnell 510017d313 WP_Debug_Data: Extract `wp-plugins` data into separate methods.
This is the eighth part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other.

This patch separates the eighth and ninth of twelve groups, the `wp-plugins-active` and `wp-plugins-inactive` info, into separate methods focused on that data.

Unlike the other patches in this series, the plugins data comes from a single source and is separated out into separate debug sections, so the active and inactive methods call a new shared method which provides raw data for both. Optimizations and refactors may occur in follow-up tickets.

This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7458
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 22:12:17 +00:00
Aaron Jorbin df9b79e4cd Bootstrap/Load: Prevent loopback scraping errors when there is no key or nonce.
For error detection and rollback functions WordPress also starts a loopback request to the homepage. This loopback request is made with special parameters that when they don't match, generates an erorr. This hardens that flow by exiting out of the check if the nonce or key is missing or the nonce is not saved in the DB. It further hardens it by not caching the failures and asking search engines not to index the url with the failures.

Props georgwordpress, swissspidy, jorbin.
Fixes #62105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 17:36:16 +00:00
Felix Arntz 245dde2107 Build/Test Tools: Resolve access failure to continue sending commit performance data to Code Vitals dashboard.
This originally broke in [58165] and unfortunately went unnoticed for a while because the failing request to send the data did not cause the GitHub workflows to fail. This changeset resolves the underlying access problem, which was happening because reusable GitHub workflows do not automatically receive secrets from the calling workflow. More concretely, the relevant `CODEVITALS_PROJECT_TOKEN` was not being explicitly passed to the reusable workflow.

The changeset also includes a change so that in the future a failing request would cause the workflow to fail, which ensures a similar problem further down the road wouldn't go unnoticed.

Props joemcgill, flixos90, swissspidy, mukesh27, sergeybiryukov
Fixes #62153.
See #61213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 16:26:12 +00:00
desrosj 8e0fa6ebc7 Build/Test Tools: Clean up PR comments after action is taken.
There’s now a number of automated comments left on pull requests to help contributors that a PR can easily be overridden with activity.

Some of the comments are only relevant until a specific action is taken. One such comment is for informing the PR author that a link to a Trac ticket is a requirement for considering any suggested changes.

This updates the pull request comment workflow to remove the comment once a link to a Trac ticket is properly included.

Props debarghyabanerjee.
Fixes #61567.
Built from https://develop.svn.wordpress.org/trunk@59169


git-svn-id: http://core.svn.wordpress.org/trunk@58564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 15:37:14 +00:00
desrosj a5ad3c3b4b Build/Test Tools: Enable testing for PHP 8.4.
With PHP 8.4 due out in November later this year, contributors have been working on ensuring WordPress 6.7 is as compatible as possible. Enough progress has been made during this release cycle where PHPUnit tests now run successfully with no failures reported.

This change enables PHP 8.4 testing throughout Core’s GitHub Action workflows to ensure no new problems are introduced going forward.

There are two exceptions to this:
- The Importer plugin has some compatibility issues that produce test failures. There is an open pull request upstream, but these problematic tests have been marked skipped when running on PHP 8.4 until that PR is merged.
- Since no stable versions of xDebug with PHP 8.4 support have been published, these tests are also skipped for now.

Props jrf, desrosj.
See #62061.
Built from https://develop.svn.wordpress.org/trunk@59168


git-svn-id: http://core.svn.wordpress.org/trunk@58563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 14:09:17 +00:00
desrosj fa4a735408 Build/Test Tools: Limit when install testing runs.
In most cases, running the installation testing workflow in forked repositories is unnecessary and wasteful. This adds conditions to that workflow to prevent the tests from running on forks unless a pull request is being made back to that fork.

This pattern is already used across other workflows.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 13:24:12 +00:00
desrosj 3b57824722 Coding Standards: Committing changes after `composer format`.
This commits some minor changes made when running `composer format`.

Follow up to [58975], [59011], [59115].
See #61103, #62014, #61648.
Built from https://develop.svn.wordpress.org/trunk@59166


git-svn-id: http://core.svn.wordpress.org/trunk@58561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 13:19:17 +00:00
Sergey Biryukov 331ebada37 Docs: Use typed array notation for the `$attrs` parameter in `links_add_base_url()`.
Follow-up to [8540], [32590], [46596].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 11:04:17 +00:00
dmsnell 4f3db72338 WP_Debug_Data: Normalize visibility of new methods.
In ongoing work to modularize the `WP_Debug_Data` class, several methods were added with `public` visibility. This patch sets the new methods to `private` as a measure to ensure optionality as the changes progress, since it's easier to move from private to public than the other way around.

Developed in https://github.com/wordpress/wordpress-develop/pull/7482
Discussed in https://core.trac.wordpress.org/ticket/61648

Follow-up to [58830], [58855], [58964], [59002], [59011], [59060], [59100].

Props apermo, jonsurrell.
Fixes #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 00:11:19 +00:00
Sergey Biryukov 3208c28c07 Tests: Bring some consistency to `links_add_base_url()` and `links_add_target()` tests.
Includes:
* Correcting the test class name as per the naming conventions.
* Documenting data provider values using hash notation.
* Passing the `$attrs` parameter to the function if not `null`.

Follow-up to [26328], [55563], [59162].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 23:44:19 +00:00
Peter Wilson 0c217f9cf3 Tests/Build Tools: Introduce tests for `links_add_base_url()`.
Props pbearne, rajinsharwar, jorbin, mukesh27, aristath, desrosj, ironprogrammer.
Fixes #60389.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 23:18:19 +00:00
joedolson 3de3fb8c83 Administration: Switch core post type labels to `add_new_item`.
In [56515], the default value of `Add New` was changed to "Add New Post / Add New Page". This caused problems with post types where `add_new` was not declared.

Change core usage to reference the `add_new_item` value and revert the default value of `add_new` back to "Add New / Add New". This retains the accessibility advantages without creating counter intuitive usage of the `add_new` key.

With this change, post types registered with no `add_new` key will be unimpacted in core, and post types registered with no `add_new_item` key will use the default "Add New Post", which is not a change from the current state.

Props smerriman, afercia, rcreators, joedolson, eclev91, johnbillion.
Fixes #60045.
Built from https://develop.svn.wordpress.org/trunk@59161


git-svn-id: http://core.svn.wordpress.org/trunk@58556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 22:46:15 +00:00
joedolson 9fd5f24d73 Administration: A11y: Clarify settings in discussion options.
Fix several settings groups in the discussion options that were written in a compound/sentence structure format. These formats are difficult to parse for screen reader users and have significant layout problems in mobile viewports.

Change settings to use independent labeling.

Props Cheffheid, anthakkar08, DrewAPicture, afercia, jwgoedert, sannevndrmeulen, sudipatel007, tirth03, joedolson.
See #31354.
Built from https://develop.svn.wordpress.org/trunk@59160


git-svn-id: http://core.svn.wordpress.org/trunk@58555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 21:28:18 +00:00
Peter Wilson 92d9e70f84 General: Expand use of `wp_get_wp_version()`.
Expands the use of `wp_get_wp_version()` to get an unmodified value of the current WordPress version in various locations in which it would be unhelpful if a plugin has modified the global `$wp_version`.

This includes:

* Theme and plugin compatibility tests
* During the upgrade process of WP Core
* Debug and site health data reports of the current version
* Version number display in the dashboard
* Block theme export and caching utilities
* The `WPDB` class

Props peterwilsoncc, hellofromtonya.
See #61627.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 00:25:15 +00:00
Sergey Biryukov 49ed36d717 Twenty Fourteen: Fix various PHPCS issues.
* Inline comments must end in full stops, exclamation marks, or question marks.
* There must be exactly one blank line after the file comment.

Follow-up to [24832], [25023], [25088], [25090], [25213], [51045].

Props pitamdey, dhruvang21, aristath.
Fixes #62098.
Built from https://develop.svn.wordpress.org/trunk@59158


git-svn-id: http://core.svn.wordpress.org/trunk@58553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-02 19:03:19 +00:00
Pascal Birchler f63068d5ba I18N: Do not load translations directly in `load_*_textdomain`.
In [59127], `_doing_it_wrong` warnings were added if plugins or themes load translations too early, either through a manual function call or just-in-time loading.

Because many plugins and themes still manually call `load_plugin_textdomain()`, `load_theme_textdomain()` or `load_muplugin_textdomain()`, even though they don't have to anymore, that caused a lot of warnings.

With this new approach, these functions merely register the translations path in the existing `WP_Textdomain_Registry` and do not immediately try to load the translations anymore. The loading is all handled by the just-in-time functionality.

This way, warnings will only be emitted if triggering the just-in-time loading too early, greatly improving the developer experience and to a degree also performance.

Props swissspidy, sergeybiryukov, mukesh27.
See #44937.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-02 13:44:17 +00:00
joedolson 9a1570e024 Revert [59139] due to broad side effects in media library.
The change in [59139] caused all media modal menus to disappear.

Unprops joedolson.
See #60666.
Built from https://develop.svn.wordpress.org/trunk@59156


git-svn-id: http://core.svn.wordpress.org/trunk@58551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 18:46:16 +00:00
Sergey Biryukov 46b25e1302 Site Health: Adjust display of the `DB_COLLATE` and `WP_ENVIRONMENT_TYPE` constants.
Includes: 
* Simplifying the logic and bringing some consistency to how the values are checked and displayed.
* Correcting the debug value for `DB_COLLATE`. This should be the actual contents of the constant, and empty if it is indeed empty, as the debug data that's copied and shared should represent the raw value, and does not need to be in a user-readable format.

Follow-up to [45782], [52021], [54239], [59147].

Props Clorith, SergeyBiryukov.
See #58265.
Built from https://develop.svn.wordpress.org/trunk@59155


git-svn-id: http://core.svn.wordpress.org/trunk@58550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 17:59:17 +00:00
cbravobernal 18f992af83 Script Modules: prevent broken links by using includes_url.
[59083] introduced an issue where Script Modules registered src does not correctly respect the includes path.

Before that change, script modules were registered using includes_url. The patch used a hard-coded path which breaks when sites are not served from the root, e.g. the site root is https://example.com/wp instead of https://example.com/.

Follow-up to [59083].

Props nendeb55, jonsurrell, cbravobernal.

Fixes #62146.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 17:25:14 +00:00
czapla 9b1e0766f7 Interactivity API: Fix code formatting and add better types in docstrings.
Follow-up to [62136].

Props swissspidy.
Fixes #62149.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 17:21:20 +00:00
noisysocks 3dfff23c24 Post WordPress 6.7 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@59152


git-svn-id: http://core.svn.wordpress.org/trunk@58547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 04:39:16 +00:00
Peter Wilson ad49ea6424 Bundled Themes: Follow up import of Twenty Twenty-Five.
Add additional references to the new default theme required in various locations of the code base, build steps and unit tests.

Follow up to [59146].

Props afragen, dd32, desrosj, davidbaumwald, jorbin, courane01, kirasong.
See #62103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 03:27:15 +00:00
noisysocks 261188f723 WordPress 6.7 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@59149


git-svn-id: http://core.svn.wordpress.org/trunk@58545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 02:17:17 +00:00
noisysocks 0e5b9a0eb4 Editor: Update packages for 6.7 Beta 1.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

See #61906.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 01:18:28 +00:00
Aaron Jorbin 9171d921f4 Site Health: Note when DB_COLLATE is defined but empty.
Right now, for example if DB_COLLATE is defined as '', the value will not be shown in the WordPress Constants list, there's just an empty space. This adds a message so it's clearer when the constant is empty.

Props Presskopp, brobken, Clorith.
Fixes #58265.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 01:12:17 +00:00
Peter Wilson 6c1b7e5db8 Bundled Themes: Initial import of the Twenty Twenty-Five default theme.
It's a new dawn, it's a new day.
It's a new default theme for 2025.
And I'm feeling good.

Props poena, karmatosed, onemaggie, juanfra, garethelwell, joen, beafialho, richtabor, noruzzaman, shailu25, kishanjasani, up1512001, ajlende, huzaifaalmesbah, kafleg, dballari, lastsplash, jennifarhat, amjadr360, rejaulalomkhan, oncecoupled, devmuhib, tanvirul, arkenon, elfu98, erichmond, kardi420, ktaron, melchoyce, maneshtimilsina, jorbin, ritterml, eherman24, vcanales, ikamal, bobbyleenoblestudios, germanfrelo, kraftbj, mcrisp1972, peterwilsoncc, luminuu, eliorivero, jeherve, fac3less, alexandrebuffet.
Fixes #62103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 23:58:16 +00:00
Adam Silverstein 28cc273c2b Media: improve support for lossless WebP.
When uploading lossless WebP images, WordPress now correctly outputs lossless WebP with both the Imagick and GD image editors.

Props: adamsilverstein, martinkrcho.
Fixes #60291.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 23:56:19 +00:00
Peter Wilson 0d0634dbc9 Formatting: Improve parenthesis handling in `make_clickable()`.
Improve the regular expression for making links clickable to account for parenthesis in links containing an extension, for example: `http://wordpress.org/my-image(2).jpg`.

Props coquardcyr, hellofromtonya, parthvataliya, rhellewellgmailcom.
Fixes #62037.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 23:29:13 +00:00
Sergey Biryukov eba0127372 External Libraries: Correct the case for `wp-includes/SimplePie/src/Gzdecode.php`.
The file should be named `Gzdecode.php` (with the capital G), to avoid autoloading problems on case-sensitive file systems (*nix).

Follow-up to [59141].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 23:27:19 +00:00
Sergey Biryukov ed37f855ce External Libraries: Update the SimplePie library to version 1.8.0.
The most notable change in this update is that all code is now namespaced and uses PSR-4 classes, though there is a compatibility layer available for extenders using the older class names, so plugin or theme authors directly using SimplePie can decide for themselves when they want to change to using the namespaced names for SimplePie classes.

Note: This commit includes additional fixes for PHP 8.4 compatibility ([https://github.com/simplepie/simplepie/pull/875 PR 875], [https://github.com/simplepie/simplepie/pull/888 PR 888]) from the `one-dot-eight` branch of SimplePie, which is expected to be [https://github.com/simplepie/simplepie/pull/886 released as SimplePie 1.8.1] soon.

References:
* [https://github.com/simplepie/simplepie/releases/tag/1.8.0 SimplePie 1.8.0 release notes]
* [https://github.com/simplepie/simplepie/releases/tag/1.7.0 SimplePie 1.7.0 release notes]
* [https://github.com/simplepie/simplepie/releases/tag/1.6.0 SimplePie 1.6.0 release notes]
* [https://github.com/simplepie/simplepie/compare/1.5.8...1.8.0 Full list of changes in SimplePie 1.8.0]

Follow-up to [47733], [49176], [52393], [52413].

Props jrf, peterwilsoncc, chaion07, cu121, markparnell, audrasjb, costdev, Presskopp, desrosj, faisal03, mukesh27, SergeyBiryukov.
See #55604.
Built from https://develop.svn.wordpress.org/trunk@59141


git-svn-id: http://core.svn.wordpress.org/trunk@58537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 22:50:19 +00:00
desrosj e86563760f Upgrade/Install: Indicate JPEG XL support when checking upgrades.
This adds tracking of the JPEG XL image type support alongside WebP, HEIC, and AVIF image types when requesting an upgrade from WordPress.org.

This will check for JPEG XL support in both ImageMagick and GD, even though GD technically does not yet have support for JPEG XL.

Props deepakrohilla, swissspidy, dd32, ayeshrajans, samiamnot, joemcgill.
Fixes #62050.
Built from https://develop.svn.wordpress.org/trunk@59140


git-svn-id: http://core.svn.wordpress.org/trunk@58536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 22:33:15 +00:00
joedolson 0768f8071b Media: Hide sidebar in Create Gallery when no actions available.
Check whether the media frame menu has action items. If not, hide the sidebar. Prevents showing a sidebar that looks interactive but contains no controls that are interactive. When in Create Gallery mode, the only action available is 'Create Gallery', and it is always active.

Props ukdrahul, ababir, ruchirj, nhrrob, joedolson, shailu25, mukesh27, sudipatel007, dhrumilk.
Fixes #60666.
Built from https://develop.svn.wordpress.org/trunk@59139


git-svn-id: http://core.svn.wordpress.org/trunk@58535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 22:22:17 +00:00
joedolson df3ba33621 Login and Registration: Add descriptive `h1` on login screens.
Add an `h1` heading with the existing `login_header()` text string on each view of the login screen. Mark the existing `h1`, used to wrap the WordPress logo, with `role="presentation"`, to remove it from the headings hierarchy.

Props roytanck, joedolson, ryokuhi, sabernhardt, pamprn, nagpai, mukesh27.
Fixes #51786.
Built from https://develop.svn.wordpress.org/trunk@59138


git-svn-id: http://core.svn.wordpress.org/trunk@58534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 19:12:14 +00:00
desrosj 3d8e08adf8 Build/Test Tools: Regenerate `script-loader-packages.min.php`.
Follow up to [59135].

See #62137.
Built from https://develop.svn.wordpress.org/trunk@59137


git-svn-id: http://core.svn.wordpress.org/trunk@58533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:48:19 +00:00
desrosj 755ed721c2 Build/Test Tools: Update/Audit NPM dependencies.
This updates several `devDependencies` to their latest versions:
- `autoprefixer` (`10.4.20`)
- `cssnano` (`7.0.6`)
- `grunt-contrib-qunit` (`10.1.1`)
- `grunt-webpack` (`7.0.0`)
- `postcss` (`8.4.47`)
- `qunit` (`2.22.0`)
- `sass` (`1.79.4`)
- `uuid` (`10.0.0`)
- `wait-on` (18.0.1`)

Also included are two minor updates to bundled dependencies:
- `json2php` (`0.0.9`)
- `wicg-inert` (`3.1.3`).

After applying these updates, `npm audit fix` and `grunt precommit:css` were run.

See #62137.
Built from https://develop.svn.wordpress.org/trunk@59135


git-svn-id: http://core.svn.wordpress.org/trunk@58531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:36:17 +00:00
joedolson 0a4679908b Quick/Bulk Edit: Add notice if no items selected.
Add an error notice if a user attempts to apply bulk edits with no items selected. Applies to post lists, comments, taxonomies, and plugins screens.

Props garrett-eclipse, nrqsnchz, sumitsingh, nihar007, royho, sabernhardt, oglekler, quadthemes, ankit-k-gupta, fnpen, ukdrahul, joedolson.
Fixes #45006, #58479.
Built from https://develop.svn.wordpress.org/trunk@59134


git-svn-id: http://core.svn.wordpress.org/trunk@58530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:24:13 +00:00
hellofromTonya 543ac83971 Canonical: Revert redirect when front page's paginated states not found.
r59091 introduced a backward compatibility (BC) break for a static homepage that includes a shortcode's or block's with paginated content that uses the `'paged'` query var, e.g. bbPress.

In this use case, attempting to navigate the shortcode / block's pagination causes a canonical redirect, rather than navigating to the next page of content within that shortcode or block.

Follow-up to [59091].

Props davidbinda, jjj.
See #50163, #meta5184.
Built from https://develop.svn.wordpress.org/trunk@59133


git-svn-id: http://core.svn.wordpress.org/trunk@58529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:18:16 +00:00
Felix Arntz fbcb084305 Editor: Allow registering PHP manifest file for block metadata collections for enhanced performance.
Typically, when registering a new block type, its metadata is read from the provided `block.json` file. The more block types are registered on a site, the more costly becomes this process, as it involves filesystem reads and parsing JSON.

WordPress Core's built-in blocks have in the past worked around that by having a auto-generated PHP manifest file that includes the already parsed JSON data for all blocks. This changeset effectively allows plugins to do the same, by introducing a new API function `wp_register_block_metadata_collection()`. The WordPress Core block manifest is now handled using this API as well, rather than custom logic baked into `register_block_type_from_metadata()`.

The `wp_register_block_metadata_collection()` function requires two parameters:
* `$path`: The base path in which block files for the collection reside.
* `$manifest`: The path to the manifest file for the collection.

Every `block.json` file that is supposed to be part of the collection must reside within the provided `$path`, within its own block-specific directory matching the block name (without the block namespace). For example, for a collection `$path` of `/wp-content/plugins/test-plugin` and a block `test-plugin/testimonial`, the block file could be `/wp-content/plugins/test-plugins/blocks/testimonial/block.json`.

It is recommended that plugins use the new API function for enhanced performance, especially if they register several block types. However, the use of the function is entirely optional. Not using it will not result in any difference in user-facing behavior.

Props mreishus, flixos90, gziolo, spacedmonkey, azaozz, mukesh27.
Fixes #62002.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 17:08:26 +00:00
czapla 5e72f32f5c Interactivity API: Add `wp_interactivity_get_element()` function.
Introduces the `wp_interactivity_get_element()` function to the Interactivity API, analogous to the `getElement()` function in the `@wordpress/interactivity` JavaScript module. This function allows access to the current element being processed during directive processing.

The function returns an array containing the `attributes` property, which includes only the originally defined attributes present on the element. Attributes added or modified by directive processing are not included. This is intended for use in derived state properties inside `wp_interactivity_state()`, similar to how `wp_interactivity_get_context()` is used.

Example usage:

```php
wp_interactivity_state( 'myPlugin', array(
    'buttonText' => function() {
        $context = wp_interactivity_get_context();
        $element = wp_interactivity_get_element();
        return isset( $context['buttonText'] )
          ? $context['buttonText']
          : $element['attributes']['data-default-button-text'];
    },
) );
```

Includes unit tests to cover the new functionality.

Props darerodz, swissspidy, cbravobernal, czapla.
Fixes #62136.
Built from https://develop.svn.wordpress.org/trunk@59131


git-svn-id: http://core.svn.wordpress.org/trunk@58527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 17:07:13 +00:00
czapla 245519d952 Interactivity API: Move interactivity-router i18n strings to Script Module data.
Moves the 'loading' and 'loaded' i18n strings for the `interactivity-router` to the script module data via the `script_module_data_@wordpress/interactivity-router` filter.

Key changes:

- Add the `filter_script_module_interactivity_router_data()` method, hooked into the `script_module_data_@wordpress/interactivity-router` filter, to set the `i18n` data with the 'loading' and 'loaded' messages.
- Rename the `print_router_loading_and_screen_reader_markup()` method to `print_router_markup()` and remove the screen reader markup from it because it's no longer needed.
- Deprecate the `print_router_loading_and_screen_reader_markup()` method.
- Remove the `loading` and `loaded` strings from the `core/router` store state because they're no longer needed.
- Initialize the `core/router` store with a minimal navigation object to prevent errors in the interactivity-router script module when the store is not properly initialized.
- Update corresponding unit tests to reflect these changes.

This change ensures that the `interactivity-router` i18n messages are localized in a single place and removes the need to initialize them in the `core/router` store state.

Props jonsurrell, swissspidy, czapla, gziolo.
See #60647.
Built from https://develop.svn.wordpress.org/trunk@59130


git-svn-id: http://core.svn.wordpress.org/trunk@58526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 16:18:17 +00:00
desrosj c2580f3c20 External Libraries: Update the Moment library to version `2.30.1`.
The Moment.js project is in maintenance mode, so the changes in this update are minor.

Props manooweb, rishit30g.
Fixes #60516.
Built from https://develop.svn.wordpress.org/trunk@59129


git-svn-id: http://core.svn.wordpress.org/trunk@58525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 16:14:22 +00:00
Pascal Birchler b771c0ddc9 I18N: Switch locale to admin locale when sending admin notifications.
If sending an email to the site administrator's email address, look up if a user with the same email exists and switch to that user's locale.
If not, falls back to the site locale as usual.

Props benniledl, swissspidy, mukesh27.
Fixes #61518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 15:52:15 +00:00
Pascal Birchler 48f12f72df I18N: Emit warnings if loading translations too early.
Some plugins and themes load translations too early, before the current user is known.
This happens either explicitly or through just-in-time translation loading.

If the current user (and thus their locale) is not known, WordPress might attempt to load translations in the wrong locale.

This change adds `_doing_it_wrong` messages to warn about such cases. It also helps avoiding accidentally trying to load translations twice (once just-in-time and once manually).

Projects triggering such a message are encourage to load translations no earlier than the `after_setup_theme` hook.

Props garrett-eclipse, Kau-Boy, swissspidy, johnbillion, alanfuller. rodelgc.
Fixes #44937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 15:30:20 +00:00
Pascal Birchler ed16539779 I18N: Fix script languages path for themes.
Remove hardcoded path added in [57922] which ignored the fact that themes can also use script translations.
They should not be affected even if plugins are installed outside the typical `wp-content/plugins` location. 

Props itapress, swissspidy.
Fixes #62016.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 14:59:18 +00:00
Sergey Biryukov 251e520c33 Docs: Add a `@since` note to `map_meta_cap()` for `edit_block_binding` capability.
Follow-up to [59122].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 13:48:16 +00:00
Bernhard Reiter 1b6e00c306 Block Hooks: Respect `"multiple": false` in hooked blocks.
If a prospective hooked block has its `multiple` block-supports field set to `false` (thus allowing only one instance of the block to be present), ensure that:

1. Only one instance of the block will be inserted if it's not yet present in the current context.
2. The block will not be inserted at all if an instance of it is already present in the current context.

As always in Block Hooks parlance, "context" denotes the containing template, template part, pattern, or navigation post that a hooked block is supposed to be inserted into.

The markup of a webpage that uses a Block Theme typically comprises a number of such contexts -- one template and any number of template parts, patterns, and navigation posts. Note that the limitation imposed by this changeset only applies on a per-context basis, so it's still possible that the resulting page contains more than one instance of a hooked block with `"multiple": false` set, as each context could contribute up to one such instance.

Props bernhard-reiter, jonsurrell, gziolo.
Fixes #61902.
Built from https://develop.svn.wordpress.org/trunk@59124


git-svn-id: http://core.svn.wordpress.org/trunk@58520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 12:23:17 +00:00
John Blackbourn 6cf0577be8 Role/Capability: Introduce the `user_can_for_blog()` function.
This complements the existing user capability checking functions and enables checking a capability of any user on any site on a Multisite network.

Props tmanoilov, rajinsharwar, n8finch, johnbillion

Fixes #45197
Built from https://develop.svn.wordpress.org/trunk@59123


git-svn-id: http://core.svn.wordpress.org/trunk@58519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 11:05:15 +00:00
cbravobernal 81a6eddf77 Block bindings: Add canUpdateBlockBindings editor setting.
Adds a `canUpdateBlockBindings` editor setting that allows to decide if the user is able to create and modify bindings through the UI. By default, only admin users can do it, but it can be overridden with `block_editor_settings_all` filter.

Props santosguillamot, gziolo, jorbin, noisysocks, matveb, cbravobernal, youknowriad, mamaduka, timothyblynjacobs, peterwilsoncc, drivingralle.
Fixes #61945.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 06:49:18 +00:00
Peter Wilson 76afc20e4e General: Delete `tests/phpunit/tests/formatting/wpTargetedLinkRel.php`.
Really delete `tests/phpunit/tests/formatting/wpTargetedLinkRel.php` this time rather than leaving it hanging around as an empty file.

Follow up to [59120].

Props noisysocks.
See #53843


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


git-svn-id: http://core.svn.wordpress.org/trunk@58517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 05:29:17 +00:00