Commit Graph

24408 Commits

Author SHA1 Message Date
Sergey Biryukov
f37de3c6ac Docs: Correct the type for ::prepare_status_response() parameter in WP_REST_Comments_Controller.
The accepted value is `WP_Comment::$comment_approved`, which is documented as a string.

Follow-up to [38832], [33891], [39015], [59805], [59871].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 22:41:24 +00:00
Felix Arntz
741a914df3 General: Allow speculative loading opt-out CSS classes to be applied on parent element, e.g. at the block level.
Follow-up to [59837].

Props flixos90, westonruter.
Fixes #63032.
See #62503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 22:14:25 +00:00
Mamaduka
b6a0684402 REST API: Add the site reading options to the index.
Exposes `page_for_posts`, `page_on_front` and `show_on_front` reading settings via REST API index.

Props mamaduka, audrasjb, spacedmonkey, timothyblynjacobs.
Fixes #63023.
Built from https://develop.svn.wordpress.org/trunk@59880


git-svn-id: http://core.svn.wordpress.org/trunk@59222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 03:39:25 +00:00
audrasjb
9d245fd864 Administration: Revert [59705] and bring back the light grey admin background.
This reverts the full-white background update that was committed in [59705] to give it more time for testing and feedback. Let's revisit this proposal later and revert to the good ol’ grey background.

Props afercia, richtabor, karmatosed, johnjamesjacoby, johnbillion, sabernhardt, 
See #62831.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 00:28:24 +00:00
audrasjb
201731789c Comments: Remove bulk action dropdown depending on user caps.
This changeset introduces the `manage_users-network_custom_column` filter that fires for each custom column in the Network Users list table. This is an override hook for `manage_users_custom_column` which was already filtering each custom column in all Users list tables.

Props lenasterg, realloc, audrasjb.
Fixes #43318.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 00:09:23 +00:00
audrasjb
2574278658 Comments: Remove bulk action dropdown depending on user caps.
This changeset adds a conditional to show the comments bulk actions dropdown only when the current user has `moderate_comments` capability.

Props snicco, iflairwebtechnologies, shanemuir, audrasjb.
Fixes #59440.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 23:50:23 +00:00
audrasjb
b0efc2929c Administration: Revert [59709].
This reverts the lighter font-weight update that was committed in [59709] to give it more time for testing and feedback.

Fixes #62865.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 22:55:23 +00:00
audrasjb
00228cf046 Administration: Adjust submenu padding in admin menu.
This changeset adjusts the padding for submenu link groups in the admin menu, ensuring consistent top and bottom padding.

Follow-up to [26072].

Props trushaamin, modi2918, hellofromTonya, peterwilsoncc, sabernhardt, im3dabasia1, audrasjb, karmatosed, dhrumilk.
Fixes #61689.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 21:47:25 +00:00
Felix Arntz
2649d14466 Editor: Allow registering block type collections with a single function call.
[59132] introduced the `wp_register_block_metadata_collection()` function and underlying `WP_Block_Metadata_Registry` class to allow central registration of a block metadata PHP manifest file in favor of parsing individual JSON files. While this improves performance, it only increases the amount of APIs and code that plugin developers need to use to register their block types properly.

This changeset introduces a new function `wp_register_block_types_from_metadata_collection()` that improves the developer experience of registering block types from a single source, by handling it in only a single function call.

Developers that already use a generated block metadata PHP manifest file (e.g. via the `wp-scripts build-blocks-manifest` tool) can now call `wp_register_block_types_from_metadata_collection()` with that file to automatically register all block types from that block metadata collection. Individual calls to `register_block_type()` or `register_block_type_from_metadata()` are no longer necessary when the new function is used.

Props flixos90, gziolo, joemcgill, mreishus, mukesh27, swissspidy.
Fixes #62267.
See #62002.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 19:40:25 +00:00
desrosj
10c16acbb2 Build/Test Tools: Raise timeout value when running tests on PHP 8.4.
The test suite when run on PHP 8.4 with MySQL is currently taking 2-3x the amount of time to run. The jobs are regularly hitting the conservative `20` minute time out configured to prevent runaway jobs.

While this performance regression is investigated, this increases the timeout value to `30` to avoid running into unnecessary failures now that the issue has been discovered.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 18:49:26 +00:00
Joe McGill
210b222613 Themes: Allow pattern files to be organized into sub-folders.
This allows theme pattern files located in a theme's `/patterns/` directory to be organized into sub-folders and will automatically be located by `WP_Theme::get_block_patterns()` method.

Props juanfra, joemcgill, poena, flixos90.
Fixes #62378.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 17:01:26 +00:00
Sergey Biryukov
91f31a5169 Docs: Correct the type for transition_comment_status action parameters.
By the time this hook runs, the `$new_status` and `$old_status` values can only be a string.

Follow-up to [26491].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 15:03:25 +00:00
audrasjb
365645c608 Date/Time: Add sanitization to WP_Locale::get_month().
By adding a sanitization to `$wp_locale->get_month()`, this changeset prevents a PHP Warning: `Undefined array key "00"` caused by `single_month_title()`. This function previously assumed that `get_query_var( 'm' )` is always at least 6 digits, and always contains the year and the month, which is not necessarily true.

Props apermo, audrasjb, xateman.
Fixes #62824.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 22:40:22 +00:00
audrasjb
f35df6f37a Build/Test Tools: Add tests for theme-related body classes.
This changeset adds new unit test cases following [59698].

Props sukhendu2002.
Fixes #19736.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 22:07:22 +00:00
audrasjb
601df51eb8 Help/About: Replace "Support" with "Support Forums" in import.php help tab.
This brings consistency with other admin screens.

Props Guido07111975, audrasjb, sabernhardt.
Fixes #63016.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 18:34:15 +00:00
Sergey Biryukov
4f774af5e8 Coding Standards: Use strict comparison in wp_transition_comment_status().
Follow-up to [9195].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 17:51:24 +00:00
Mamaduka
b2fdfe280c Editor: Add option to ignore sticky posts in Query block.
Introduce a new `ignore` value for the `sticky` query argument. When this value is used, the query will not prepend sticky posts at the top but display them in the natural order.

Props mamaduka, peterwilsoncc, audrasjb, mikinc860, poena, dhruvishah2203, joemcgill.
Fixes #62908.
Built from https://develop.svn.wordpress.org/trunk@59866


git-svn-id: http://core.svn.wordpress.org/trunk@59208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 05:12:23 +00:00
John Blackbourn
802523f5d7 Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59865


git-svn-id: http://core.svn.wordpress.org/trunk@59207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 13:43:23 +00:00
Sergey Biryukov
d685ee9b02 Docs: Correct DocBlock formatting for wp_check_comment_disallowed_list().
Follow-up to [6553], [48121], [48575].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 07:07:16 +00:00
Sergey Biryukov
73276fe471 Docs: Correct DocBlock formatting for wp_check_comment_data().
Follow-up to [59319].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 06:36:20 +00:00
Peter Wilson
b0e3290d7f Coding Standards: Rename variable in update_meta_cache() for accuracy.
Renames the variable `$cache_key` to `$cache_group` in `update_meta_cache()` for accuracy.

Follow up to [11943].
See #62279.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 21:53:26 +00:00
John Blackbourn
ecc9f15d4c Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59861


git-svn-id: http://core.svn.wordpress.org/trunk@59203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 11:11:21 +00:00
Sergey Biryukov
6b79b04807 Coding Standards: Use strict comparison in get_page_of_comment().
Follow-up to [9367], [9522], [9808].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 05:15:25 +00:00
audrasjb
8240259860 Site Health: Improve HTML semantics for tables used in Site Health debug tab.
This changeset removes the `presentation` role from the Site Health debug tab tables to switch them into regular data tables, and updates the related stylesheet to keep the previously used styles.

Props audrasjb, hbhalodia, rvouill, mukesh27, sabernhardt, joedolson, alexstine.
Fixes #62880.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 12:12:20 +00:00
Sergey Biryukov
80167f26b1 Docs: Correct the note on default nonce lifespan in wp_verify_nonce() description.
Follow-up to [31381], [45565].

Props lev0, Rarst, peterwilsoncc, johnbillion.
Fixes #53236.
Built from https://develop.svn.wordpress.org/trunk@59858


git-svn-id: http://core.svn.wordpress.org/trunk@59200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 01:50:19 +00:00
joedolson
2bd025464c Bundled Theme: A11y: Fix skip link in Twenty Ten.
Fix the source positioning of the skip link in Twenty Ten and add CSS for visibility on focus.

Props anonymized_3085, iammattthomas, joedolson, sabernhardt, shailu25, mukesh27, poena.
Fixes #14795.
Built from https://develop.svn.wordpress.org/trunk@59857


git-svn-id: http://core.svn.wordpress.org/trunk@59199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 01:38:24 +00:00
audrasjb
3dad409c39 TwentyTwentyOne: Add aria-controls attributes to primary sub-menu.
On the Twenty Twenty-One theme, this changeset adds `aria-controls` attribute to sub-menu buttons and an `id` to the sub-menu wrapper for additional context on what is being expanded.

Props bschneidewind, audrasjb, anandraj346.
Fixes #62973.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 00:30:22 +00:00
joedolson
39c764d2f8 Media: Support generating filenames without a suffix.
Add support handling an empty string in the `$suffix` parameter that allows a file name to be generated with no suffix added. This makes it possible to avoid adding irrelevant suffixes in cases like converting image formats.

Props azaozz, debarghyabanerjee, joedolson.
See #62359.
Fixes #62385.
Built from https://develop.svn.wordpress.org/trunk@59855


git-svn-id: http://core.svn.wordpress.org/trunk@59197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 20:25:24 +00:00
joedolson
690d904786 Themes: Support :focus-visible in theme.json.
Add the `:focus-visible` pseudo selector as a valid element in the `theme.json` schema. See also https://github.com/WordPress/gutenberg/pull/68521.

Props huubl, audrasjb, poena, sabernhardt, afercia, annebovelett. 
Fixes #62906.
Built from https://develop.svn.wordpress.org/trunk@59854


git-svn-id: http://core.svn.wordpress.org/trunk@59196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 16:48:22 +00:00
audrasjb
7f13d32bc2 Site Health: Improve fonts directory check.
This changeset enhances the filesystem checks in the Site Health debug data by addressing the following:
- Existence Check: Before checking if the fonts directory is writable, it first verifies whether the directory exists.
- Improved Messaging: If the fonts directory does not exist, the debug output now reflects this scenario as "Does not exist". If the directory exists, it shows whether it is writable or not.

Props zodiac1978, samiamnot, sainathpoojary, abcd95, ankitkumarshah, im3dabasia1.
Fixes #62633.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 14:52:24 +00:00
Sergey Biryukov
d8b45098da Coding Standards: Use strict comparison in wp_delete_comment().
Follow-up to [3271], [47219].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 00:35:22 +00:00
audrasjb
bbe792936c Bundled Themes: Prevent a fatal error occurring with Twenty Fourteen paginated navigation.
This changeset replaces `array_map( 'urlencode', $query_args )` with `urlencode_deep( $query_args )` in `twentyfourteen_paging_nav()` to prevent a fatal error when an array is provided in the query vars.

Props takayukister, pratiklondhe, rinkalpagdar.
Fixes #62972.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 23:32:23 +00:00
audrasjb
54734b4396 Administration: Capitalize "Edit Site" strings for consistency.
This changeset brings more consistency by capitalizing the "Edit Site" strings located in the Toolbar and on the Site Editor screen.

Props bronsonquick, sabernhardt, audrasjb, peterwilsoncc, adamsilverstein.
Fixes #62971.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 23:16:20 +00:00
audrasjb
20c3c4fdff Administration: Capitalize "Collapse Main Menu" aria-label string for better consistency.
Follow-up to [59847].

Props swissspidy.
Fixes #59133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 21:29:22 +00:00
Aaron Jorbin
bb88b6a7f2 Build/Test: Fix JavaScript linting scripts
`wp-prettier` was out of date and no longer compatible with wp-scripts. Additionally, many generated files and plugins were not being properly ignored which could cause linting to take so long that it was basically unusable.

Props ankitkumarshah, jorbin.
See #62935.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 20:02:31 +00:00
audrasjb
535cb17cbb Administration: Capitalize "Collapse Menu" string for better consistency.
This changeset brings more consistency by capitalizing the "Collapse Menu" string localted in the main admin menu.

Props alireyad, bijit027, amimulihsanmahdi, csesumonpro.
Fixes #59133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 15:05:23 +00:00
desrosj
d6db5ff0a8 Coding Standards: Properly space and indent ! defined() checks.
Props viralsampat shailu25, audrasjb.
Fixes #62750.
Built from https://develop.svn.wordpress.org/trunk@59846


git-svn-id: http://core.svn.wordpress.org/trunk@59188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 08:42:28 +00:00
Adam Silverstein
d9e9011369 Media: fix indentation for media.php.
Follow up to r59844.

Props: mukesh27.

See #62900.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 07:24:16 +00:00
Adam Silverstein
da8f997ab6 Media: fix full size image generation for PNG uploads.
Remove a limitation that prevented PNG uploads from generating the full sized image. Fixes a bug where using the image_editor_output_format filter would not generate full sized images as expected. The removed code was present to prevent overly large PNG image output, however this issue was resolved separately in #36477.

Props: adamsilverstein, pixlpirate, flixos90, mukesh27, azaozz.

Fixes #62900.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 06:46:19 +00:00
poena
4d8b360601 Twenty Ten: Correct the styling of the file block.
This change updates the padding, line height, and text color of the button in the file block,
so that the styling is not overriden by the link styles.

Props poena, sainathpoojary, mai21, parthvataliya, devtanbir, ankitkumarshah, sabernhardt, shailu25.
Fixes #62793.
Built from https://develop.svn.wordpress.org/trunk@59843


git-svn-id: http://core.svn.wordpress.org/trunk@59185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 06:10:23 +00:00
poena
a3d2826e61 Twenty Twelve: Update the quote pattern to use the quote block.
This change updates the Left-aligned Large Quote pattern to use the quote block instead of
paragraph blocks.

Props flairwebtechnologies, sabernhardt, karmatosed, wpeople, poena, nithins53, balub, sukhendu2002, dilip2615, itpathsolutions, shraddhagore, shailu25.
Fixes #61765.
Built from https://develop.svn.wordpress.org/trunk@59842


git-svn-id: http://core.svn.wordpress.org/trunk@59184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 05:40:24 +00:00
Sergey Biryukov
2c77ef11d2 Coding Standards: Use strict comparison in wp_new_comment_notify_postauthor().
Follow-up to [2894], [34106], [34250], [34545], [36119].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 03:19:24 +00:00
Sergey Biryukov
5f01118b48 Coding Standards: Use strict comparison in wp_new_comment_notify_moderator().
Follow-up to [2894], [34106], [34250], [34252], [35339].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 19:29:22 +00:00
johnjamesjacoby
21ba106dfb Block Hooks: Remove WP_Post type hint.
This change prevents a PHP deprecation notice in the new `apply_block_hooks_to_content_from_post_object()` function, introduced in r59838.

Fixes #62716.
Built from https://develop.svn.wordpress.org/trunk@59839


git-svn-id: http://core.svn.wordpress.org/trunk@59181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 17:14:23 +00:00
Bernhard Reiter
c5f7803d64 Block Hooks: Add function to encapsulate wrapping in ad-hoc parent.
Introduce a new function, `apply_block_hooks_to_content_from_post_object`, to colocate the logic used to temporarily wrap content in a parent block (with `ignoredHookedBlocks` information fetched from post meta) alongside the call to `apply_block_hooks_to_content`. Fetching that information from post meta is required for all block types that get their content from post objects, i.e. Post Content, Synced Pattern, and Navigation blocks.

Additionally, the newly introduced function contains logic to ensure that insertion of a hooked block into the `first_child` or `last_child` position of a given Post Content block works, even if that block only contains "classic" markup (i.e. no blocks).

Props bernhard-reiter, gziolo, mamaduka.
Fixes #61074, #62716.
Built from https://develop.svn.wordpress.org/trunk@59838


git-svn-id: http://core.svn.wordpress.org/trunk@59180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 14:52:22 +00:00
Felix Arntz
7529466125 General: Add speculative loading support via the Speculation Rules API.
This changeset adds support for the Speculation Rules API and configures it by default to `prefetch` certain links with an eagerness of `conservative`, leading to improved performance by starting to load URLs before the user lands on them.

The new `WP_Speculation_Rules` class is a container class representing the set of used speculation rules. By default, WordPress Core will only add a single speculation rule, which results in most links being prefetched conservatively.

The behavior of that main speculation rule can be altered by using the new `wp_speculation_rules_configuration` filter, which receives an associative array with `mode` and `eagerness` keys, or `null`. Both `mode` and `eagerness` have a default value of `auto`, which for now will result in the aforementioned behavior. The value `null` is used by default in certain scenarios such as when the current user is logged in. Developers can explicitly provide supported mode values (`prefetch` or `prerender`) and other supported eagerness values (`conservative`, `moderate`, or `eager`) to override and enforce the respective behaviors, or return `null` to disable speculative loading feature (either unconditionally or for certain situations). The Speculative Loading feature plugin for example, which this feature is based on, will make use of this filter to continue to use mode `prerender` and eagerness `moderate` by default. Developers can call the `wp_get_speculation_rules_configuration()` function to check how speculative loading is configured on the WordPress site.

Another important filter introduced is `wp_speculation_rules_href_exclude_paths`, which allows to expand the list of URL patterns that are excluded from being prefetched or prerendered per WordPress Core's main speculation rule configuration. Several URL patterns such `/wp-admin/*` (any URL within WP Admin) or `/*\\?(.+)` (any URL that includes query parameters) are already excluded by default. Plugins that use content that would be preferable not to prefetch or prerender can use the filter to provide corresponding URL patterns.

More advanced customization is possible by adding further speculation rules that will be loaded in addition to WordPress Core's main speculation rule. This can be achieved via the new `wp_load_speculation_rules` action, which receives the `WP_Speculation_Rules` class instance and can amend it as needed.

Props flixos90, westonruter, joemcgill, desrosj, mukesh27, tunetheweb, thelovekesh, adamsilverstein, swissspidy, domenicdenicola, jeremyroman.
Fixes #62503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-18 22:32:22 +00:00
Sergey Biryukov
bbb8734811 Docs: Correct the type for the_modified_date filter parameter.
Due to concatenation directly above, this value can only be a string.

Follow-up to [28130], [48929].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-18 08:04:23 +00:00
audrasjb
5c501993ef Uploads: Use the word-wrap-break-word instead of specific CSS on .upload-error-filename.
This changeset replaces the `word-break: break-all` CSS declaration added to the `.upload-error-filename` element with the common class `word-wrap-break-word`, for better maintainability.

Follow-up to [59834].

Props sabernhardt.
Fixes #62980.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 22:58:23 +00:00
audrasjb
8b93b4e988 Uploads: Fix media uploader styling issue for long filenames.
This changeset resolves an issue where long filenames in the media uploader modal would overflow their container. By adding `word-break: break-all;` to the `.upload-error-filename` class, filenames now properly break into multiple lines.

Props kharisblank, audrasjb, sainathpoojary.
Fixes #62980.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 22:01:24 +00:00
desrosj
5c8414f797 Build/Test Tools: Update 3rd party actions in new workflow files.
Follow up to [59749].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 21:08:22 +00:00