Commit Graph

51658 Commits

Author SHA1 Message Date
johnjamesjacoby
ff31fa4b12 Canonical: prevent "Undefined array key" PHP warnings when host is not set.
This change is necessary to prevent scanning tools from polluting debug/error logs of some hosting configurations with PHP warnings simply by omitting the Host header from their requests.

This commit makes sure that all of the required `host`, `path`, `query`, and `scheme` array keys inside of the `redirect_canonical()` function are always set after various operations have been performed on them.

It also includes 1 new test case and 2 additional tests, to verify the problem and its fix are working as intended, as well as a small modification to the `get_canonical()` phpunit helper specifically to account for `HTTP_HOST` maybe not being set.

Props artz91, johnjamesjacoby, mindctrl, sirlouen.

Fixes #63316.
Built from https://develop.svn.wordpress.org/trunk@61136


git-svn-id: http://core.svn.wordpress.org/trunk@60472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 18:31:29 +00:00
desrosj
2e23057420 Build/Test Tools: Only open pull requests need testing instructions.
This adds some logic to avoid leaving automated comments with instructions to test in Playground when the pull request has been closed.

Props jeffpaul.
See #63170.
Built from https://develop.svn.wordpress.org/trunk@61135


git-svn-id: http://core.svn.wordpress.org/trunk@60471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 18:29:26 +00:00
desrosj
08103a3256 Emoji: Update Twemoji to version 17.0.1.
Unicode 17 includes 7 new Emoji code points. All 7 were included in Emoji 17, which was officially released in early September 2025.

In addition to these 7 new single code point Emoji, Emoji 17 also includes 156 additional Emoji possibilities using modifiers or ZWJ sequences to create various gender and skin tone combinations.

“This Emoji update is the best to date by a landslide 🛘“ may not be an opinion you hold. Perhaps you’re disappointed, hearing sad trombones in your head 🪊🪊. Thankfully, there’s a whole treasure chest 🪎  of Emoji to choose from (3,953 and counting).

🫈 But why do I always feel like I'm in The Twilight Zone? And I always feel like somebody's watchin' me? 🫈

Props westonruter, dd32.
Fixes #64184.
Built from https://develop.svn.wordpress.org/trunk@61134


git-svn-id: http://core.svn.wordpress.org/trunk@60470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 18:18:31 +00:00
johnjamesjacoby
0b98fc0980 Options: Combine date & time strings to improve translation accuracy.
This commit merges 2 separate translatable strings into 1 (with a translator note) to make its Daylight-Saving-Time-specific context easier to identify & understand.

Props jorbin, pbearne, timse201.

Fixes #64197.
Built from https://develop.svn.wordpress.org/trunk@61133


git-svn-id: http://core.svn.wordpress.org/trunk@60469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 18:01:38 +00:00
desrosj
c87d294264 Build/Test Tools: Remove MariaDB 10.4 from the test matrix.
MariaDB 10.4 has fallen below 1% usage across all WordPress sites, according to wordpress.org/stats.

This 1% threshold was established as the minimum percentage of installs required to be included in the PHPUnit testing matrix in [59587].

Props jorbin.
See #63167.
Built from https://develop.svn.wordpress.org/trunk@61132


git-svn-id: http://core.svn.wordpress.org/trunk@60468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 17:25:27 +00:00
johnjamesjacoby
36fab9c398 Mail: reset Encoding to 8-bit in wp_mail().
The PHPMailer library may automatically switch its encoding based on various internal factors.

This commit fixes a bug where the `$phpmailer` global was unintentionally persisting its `Encoding` property from the first `wp_mail()` call to all subsequent calls.

This includes unit tests to verify the fix is accurate, and a change to the mock-mailer helper that worked around this bug just-in-time when running the test suite.

Props codebuddy, dilip2615, rishabhwp, sajjad67, sirlouen, stephenharris.

Fixes #33972.
Built from https://develop.svn.wordpress.org/trunk@61131


git-svn-id: http://core.svn.wordpress.org/trunk@60467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 17:20:34 +00:00
jorgefilipecosta
407748f330 Abilities API: Use stricter doing_action check when registering.
Applies feedback provided that doing_action would be better check on this situation to avoid developers facing future registration timing issues.

Developed in #10452.

Props gziolo, jorgefilipecosta, flixos90, mukesh27, jason_the_adams.
See #64098.
Built from https://develop.svn.wordpress.org/trunk@61130


git-svn-id: http://core.svn.wordpress.org/trunk@60466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 16:34:38 +00:00
ellatrix
88765fd257 Post WordPress 6.9 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@61129


git-svn-id: http://core.svn.wordpress.org/trunk@60465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 15:31:38 +00:00
ellatrix
262903d36a WordPress 6.9 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@61128


git-svn-id: http://core.svn.wordpress.org/trunk@60464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 15:09:35 +00:00
davidbaumwald
7341300ff8 Command Palette: Ensure $menu_label is initialized before using it.
Unprops davidbaumwald.

Follow-up to [61126].

Props cbravobernal.
See #64196.
Built from https://develop.svn.wordpress.org/trunk@61127


git-svn-id: http://core.svn.wordpress.org/trunk@60463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 14:19:36 +00:00
davidbaumwald
16485b23ce Command Palette: Use HTML_Tag_Processor to get the menu label when enqueueing assets, not regex.
`HTML_Tag_Processor` is more better.

Follow-up to [61022].

Props dmsnell, cbravobernal.
Fixes #64196.
Built from https://develop.svn.wordpress.org/trunk@61126


git-svn-id: http://core.svn.wordpress.org/trunk@60462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 14:01:34 +00:00
ellatrix
741e71e2f7 Sync packages for WP 6.9 beta 3.
Changes can be found at https://github.com/WordPress/gutenberg/commits/wp/6.9/.

Developed in https://github.com/WordPress/wordpress-develop/pull/10453.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.

Fixes #64185.
Props priethor, mukesh27, jeffpaul, westonruter, desrosj, wildworks.
Built from https://develop.svn.wordpress.org/trunk@61125


git-svn-id: http://core.svn.wordpress.org/trunk@60461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 12:36:42 +00:00
wildworks
2d788f6ebd Command Palette: Decode HTML entities in menu url
Decode HTML entities in the menu URL so that query parameters, etc., will function as expected.

Follow-up to [61022].

Props swissspidy, tusharaddweb, youknowriad.
Fixes #64177.
Built from https://develop.svn.wordpress.org/trunk@61124


git-svn-id: http://core.svn.wordpress.org/trunk@60460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 09:39:31 +00:00
Weston Ruter
6af32c813a Site Health: Improve messaging for PHP version status.
Previously, the status could be misleading, especially if the check against the WordPress.org API failed. The initial status message is now more neutral, and a dedicated check has been added to handle cases where the API is unreachable.

Developed in https://github.com/WordPress/wordpress-develop/pull/7350

Follow-up to [58832].

Props pbearne, joemcgill, mukesh27, peterwilsoncc, swb1192, krupajnanda, psykro, SergeyBiryukov, swissspidy, imranhasanraaz, amin7, flixos90, vgnavada, audrasjb, adamsilverstein, Presskopp, westonruter.
Fixes #61623.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 08:50:35 +00:00
Weston Ruter
8534f6b1a8 Script Loader: Load block styles on demand in classic themes even when wp-block-styles support is absent.
This reverts part of [61076] which made `wp-block-styles` theme support a precondition for opting in to `should_load_separate_core_block_assets` and `should_load_block_assets_on_demand`. This meant that the Twenty Twenty theme (and other themes without this support declared) would not benefit from on-demand block style loading. Nevertheless, even though such themes were not getting block styles loaded on demand, the  `wp_load_classic_theme_block_styles_on_demand()` function was proceeding to opt in to the output buffer for hoisting late-printed styles, even though it was unlikely there would then be any. This meant the template enhancement output buffer was being opened for no reason.

Enabling on-demand block style loading is measured to improve FCP and LCP in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection when loading the Sample Page.

Developed in https://github.com/WordPress/wordpress-develop/pull/10457

Follow-up to [61008], [61076], [60936].

Props westonruter.
See #64099, #64150, #64166, #43258.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 07:55:36 +00:00
wildworks
aaf46f5fa3 Command Palette: Add network admin check
To prevent the registration of commands that would cause a 404 error in the network admin screen, pass the result of the `is_network_admin()` check to the command palette initialization function.

Follow-up to [61022].

Props jorbin, ntsekouras, soean, tobiasbg
Fixes #64125.
Built from https://develop.svn.wordpress.org/trunk@61121


git-svn-id: http://core.svn.wordpress.org/trunk@60457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 07:05:31 +00:00
Weston Ruter
074794e960 General: Ensure errors can be displayed when triggered during finalization of the template enhancement output buffer.
When `display_errors` (`WP_DEBUG_DISPLAY`) is enabled, errors (including notices, warnings, and deprecations) that are triggered during the `wp_template_enhancement_output_buffer` filter or the `wp_finalized_template_enhancement_output_buffer` action have not been displayed on the frontend since they are emitted in an output buffer callback. Furthermore, as of PHP 8.5 attempting to print anything in an output buffer callback causes a deprecation notice. This introduces an error handler and try/catch block to capture any errors and exceptions that occur during these hooks. If `display_errors` is enabled, these captured errors are then appended to the output buffer so they are visible on the frontend, using the same internal format PHP uses for printing errors. Any exceptions or user errors are converted to warnings so that the template enhancement buffer is not prevented from being flushed.

Developed in https://github.com/WordPress/wordpress-develop/pull/10310

Follow-up to [61111], [61088], [60936].

Props westonruter, dmsnell.
See #43258, #64126.
Fixes #64108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 05:28:39 +00:00
Weston Ruter
f7a4525383 Embeds: Add wp_oembed_add_discovery_links() to run earlier at wp_head priority 4.
This results in the oEmbed discovery links being printed before scripts and styles are printed. This helps ensure they appear within the first 150K bytes of the HTML response, which is required by `WP_oEmbed::discover()`. With increasing the `styles_inline_size_limit` from 20K to 40K in #63018, it becomes more probable that the oEmbed discovery links will be pushed out of range.

For backwards compatibility with themes and plugins that disable the oEmbed discovery links by unhooking `wp_oembed_add_discovery_links()` from running at `wp_head` priority 10 (even though the `oembed_discovery_links` filter is available to disable such links), this callback is added a second time to run earlier at priority 4. The first time the function runs, it checks to see if the callback is still hooked at priority 10. If not, the function short circuits. If it is still hooked at priority 10, however, the function then unhooks itself at priority 10 so that it won't run a second time later during the `wp_head` action, before proceeding with printing the discovery links. A similar back-compat approach was taken previously in [60910]. The back-compat checks are only performed if the function is invoked during the `wp_head` action, allowing the function to be called "idempotently" elsewhere.

Developed in https://github.com/WordPress/wordpress-develop/pull/10449

Follow-up to [61118], [61117].

Props westonruter, swissspidy.
See #64186, #63018.
Fixes #64178.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 00:47:33 +00:00
Weston Ruter
c8ef6c5354 Plugins: Add missing $priority parameter to has_filter() and has_action().
This brings `has_filter()`/`has_action()` in parity with `add_filter()`/`add_action()` and `remove_filter()`/`remove_action()`, all of which support a `$priority` parameter.

Props westonruter, swissspidy.
Fixes #64186.
See #64178.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-03 23:47:33 +00:00
Weston Ruter
9f4eb0d284 Script Loader: Reduce styles_inline_size_limit down to 40K from 50K.
In [61013] the CSS inline limit was increased from 20K to 50K. However, based on benchmarking the performance improvements of increasing the limit, the relative improvement from 40K to 50K is not as great as from 30K to 40K. The performance improvements start to flatten out beginning at 40K. This 40K is still double the previous limit of 20K. Being more conservative will allow for a more gradual impact to be observed before considering a larger increase. Furthermore, the 50K limit of inline CSS can cause the oEmbed discovery links to be positioned after the first 150K bytes which prevents them from being discovered. See #64178.

Follow-up to [61013].

Props westonruter, mukesh27, szepeviktor.
See #64178.
Fixes #63018.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-03 21:57:33 +00:00
Weston Ruter
71dab9f7cf Filesystem API: Update WP_Filesystem_FTPext::$link phpdoc type.
This accounts for when `ftp_ssl_connect()`/`ftp_connect()` returns `false` as well as for when `FTP\Connection` is returned instead of `resource` as of PHP 8.1. 

Props SirLouen, kalpeshh, audrasjb.
Fixes #63201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-03 21:38:34 +00:00
jorgefilipecosta
5e3455d88b Block editor: Don't load fit text frontend scripts on the editor.
This commit fixes an issue where the FitText frontend script (fit-text-frontend.js) was incorrectly being enqueued and loaded in the block editor when editing posts that contain blocks with the fitText attribute enabled. It had no big impact has the script does not do anything on the editor (the classes the script searches are not there) but still it's useless bytes we are sending.

Developed in #10437.

Props jorgefilipecosta, oandregal.
Fixes #64173.
Built from https://develop.svn.wordpress.org/trunk@61115


git-svn-id: http://core.svn.wordpress.org/trunk@60451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-03 19:48:38 +00:00
Sergey Biryukov
2d72e07779 Docs: Update description for some method parameters in WP_REST_Server class.
Follow-up to [47224], [59032].

Props dilipbheda, mukesh27, kirasong, shailu25, khushdoms, welcher, audrasjb, SergeyBiryukov.
Fixes #63249.
Built from https://develop.svn.wordpress.org/trunk@61114


git-svn-id: http://core.svn.wordpress.org/trunk@60450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-03 16:49:39 +00:00
Sergey Biryukov
fabb94e505 Docs: Correct the type for some method parameters in WP_REST_Server class.
Follow-up to [34928].

Props dilipbheda, mukesh27, kirasong, shailu25, khushdoms, welcher, audrasjb, SergeyBiryukov.
See #63249.
Built from https://develop.svn.wordpress.org/trunk@61113


git-svn-id: http://core.svn.wordpress.org/trunk@60449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-02 17:29:34 +00:00
Sergey Biryukov
6d7766478e Docs: Correct @return type for WP_REST_Response::remove_link().
Follow-up to [34928].

Props dilipbheda, mukesh27, kirasong, shailu25, khushdoms, welcher, audrasjb, SergeyBiryukov.
See #63249.
Built from https://develop.svn.wordpress.org/trunk@61112


git-svn-id: http://core.svn.wordpress.org/trunk@60448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-01 22:52:34 +00:00
Weston Ruter
1e305838fe General: Rename wp_send_late_headers action to wp_finalized_template_enhancement_output_buffer.
Also update docs for `wp_finalized_template_enhancement_output_buffer` action and `wp_template_enhancement_output_buffer` filter to warn against attempting to open an output buffer in callbacks or else a PHP fatal error will occur.  

Developed in https://github.com/WordPress/wordpress-develop/pull/10443

Follow-up to [61088], [60936].

Props westonruter, dmsnell.
See #43258.
Fixes #64126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-01 04:46:31 +00:00
Weston Ruter
66b49e5679 Emoji: Convert emoji to HTML entities for utf8mb3 columns during wp_insert_post().
The `utf8` character set is a deprecated alias of `utf8mb3`, but only the former was accounted for.

Follow-up to [31733].

Props kasparsd, mikefitzman, dmsnell, salzano, sabernhardt, ankit-k-gupta, nataliat2004, josklever, slaFFik, staurand.
See #31242, #21212.
Fixes #60362.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-01 03:34:35 +00:00
Weston Ruter
60fde0f727 Bundled Themes: Modernize Genericons.
This updates Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, and Twenty Sixteen as follows:

* Remove legacy Internet Explorer support by deleting EOT file rules from CSS.
* Remove IE hacks from the version included in Twenty Thirteen and Twenty Fourteen.
* Remove `filter` rules from the CSS included in Twenty Sixteen.
* Remove the TTF and SVG `src` references for all four themes.
* Remove all prefixes from transform in the rotate and flip classes available in Twenty Sixteen.
* Edit the values for prefixed transition properties in Twenty Fifteen and Twenty Sixteen.
* Update CSS comments.

Developed in https://github.com/WordPress/wordpress-develop/pull/10427

Props sabernhardt, metodiew, peterwilsoncc, mukesh27, westonruter.
See #56699, #58836.
Fixes #62128.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-01 02:42:34 +00:00
joedolson
ad956b105c Themes: Prevent PHP notice thrown in wp_title_parts.
The value passed to the `wp_title_parts` filter is run through `explode()`, but can be empty. This throws a PHP notice.

If value of `$title` is empty, return an empty array without exploding.

Props nexbridge, dhruvang21, tussendoor, michaelreetz, o-o, beee, sabernhardt, sirlouen, nimeshatxecurify, westonruter, sirlouen.
Fixes #61352.
Built from https://develop.svn.wordpress.org/trunk@61108


git-svn-id: http://core.svn.wordpress.org/trunk@60444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 23:23:36 +00:00
joedolson
6d96c52fba Twenty Twelve: Restore support for Image block rounded style.
The specificity changes in core block-library styles in 6.6 caused the image block rounded style to have lower specificity than the theme stylesheet.

Add the radius ruleset from the block-library styles to Twenty Twelve to restore support.

Props lancewillett, sabernhardt, mukesh27, dhruvang21, rollybueno, shailu25, joedolson.
Fixes #64041.
Built from https://develop.svn.wordpress.org/trunk@61107


git-svn-id: http://core.svn.wordpress.org/trunk@60443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 22:34:39 +00:00
joedolson
9ae6d2ae4b Twenty Twenty One: Fix editor spacing with inner blocks.
Fix margin on inner blocks (e.g. list item blocks) and body line-height in the editor styles for Twenty Twenty One.

Props nidhidhandhukiya, rishabhwp, shailu25, ugyensupport, sabernhardt, karmatosed, sandeepdahiya, mleraygp, sirlouen, skithund, dilip2615.
Fixes #60196, #63549.
Built from https://develop.svn.wordpress.org/trunk@61106


git-svn-id: http://core.svn.wordpress.org/trunk@60442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 22:25:33 +00:00
Adam Silverstein
59991fff9b Editor: Notes should not appear in the context of comments.
Prevent notes from inadvertently showing up in the context of comments - including on the Dashboard recent comments widget and the “Mine” count on the Comments page. Notes are stored as a custom ‘note’ comment type and this change ensures the note type is only returned when explicitly requested, or when ‘all’ types are requested.

The query for note children is modified to return all child notes. This fixes an issue where children were no longer being returned for the ‘note’ type.

Also fixes https://github.com/WordPress/gutenberg/issues/72548.


Props adamsilverstein, timothyblynjacobs, shailu25, peterwilsoncc, westonruter, mamaduka, kadamwhite.
Fixes #64145.
Fixes #64152.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 18:57:30 +00:00
joedolson
180d098dfa Widgets: A11y: Prevent dropdowns from submitting on esc in Windows.
On Chrome and Firefox for Windows, the dropdown format for Category and Archives widgets  will submit if the user closes the `select` element using Escape. Escape should instead cancel the action.

Fix the classic Category and Archives widgets to prevent submission on `esc` keypresses.

Props adrock42, sabernhardt, whyisjake, westonruter, joedolson, nikunj8866, fakhriaz, mukesh27.
Fixes #63531.
Built from https://develop.svn.wordpress.org/trunk@61104


git-svn-id: http://core.svn.wordpress.org/trunk@60440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 18:54:35 +00:00
Sergey Biryukov
7bb1734d3a General: Return processed array values early in wp_slash().
This is a micro-optimization to avoid an unnecessary `is_string()` check.

Follow-up to [23555], [48433].

Props dilipbheda, audrasjb, staurand, rollybueno, psykro, westonruter, SergeyBiryukov.
Fixes #63211.
Built from https://develop.svn.wordpress.org/trunk@61103


git-svn-id: http://core.svn.wordpress.org/trunk@60439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 12:33:35 +00:00
Weston Ruter
e4fed9713e Coding Standards: Improve formatting of phpdoc for params in wpdb class.
Props truptikanzariya, rollybueno.
See #63168.
Fixes #64160.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 05:29:37 +00:00
desrosj
3e5323a87c Build/Test Tools: Use the correct syntax for a .filter().
Follow up to [61100].

Props peterwilsoncc.
Fixes #64175.
Built from https://develop.svn.wordpress.org/trunk@61101


git-svn-id: http://core.svn.wordpress.org/trunk@60437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 01:57:32 +00:00
desrosj
b23db1459b Build/Test Tools: Remove in:body from pull request search query.
When searching for pull requests using the GraphQL API, `in:body` is not being respected in search queries. Because it’s common for Trac tickets to be referenced in the discussions happening in comments and reviews, some pull requests are being closed out incorrectly.

This removes `in:body` from the search query introduced in [59661] and instead checks the `bodyText` for references to the fixed tickets.

The `state` field is also being removed because it is unused.

Props dd32, peterwilsoncc, johnbillion, joedolson, westonruter, dmsnell.
Fixes #64175.
Built from https://develop.svn.wordpress.org/trunk@61100


git-svn-id: http://core.svn.wordpress.org/trunk@60436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-31 01:38:33 +00:00
joedolson
16a08879f0 Media: A11y: Switch uploader toggle to button and set focus.
The control to switch between the browser uploader and the default uploader used a link with `target="_blank"`, but was driven by scripts. In a no-js context, this meant that the link could be used to open the browser uploader in a new tab. This is unnecessary, however, because the default uploader is not rendered when JS is not available.

On switching uploaders, browser focus was lost.

For more predictable keyboard and screen reader behavior, switch the media uploader toggle to a `button` element and set focus to the upload button in the new context.

Props dilipbheda, sabernhardt, rollybueno, westonruter, joedolson.
Fixes #63238.
Built from https://develop.svn.wordpress.org/trunk@61099


git-svn-id: http://core.svn.wordpress.org/trunk@60435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 22:32:34 +00:00
joedolson
96dcb2b13c Media: Prevent fatal error if metadata is an array.
Check the data type of ID3 data on import before running `wp_kses_post` or `wp_kses_post_deep` to fix a fatal error thrown when attempting to run `wp_kses_post` on non-string content in PHP 8.2+.

Adds unit tests to verify.

Props sllimrovert, ankitkumarshah, rollybueno, wpfy, hmbashar, SirLouen, johnbillion, huzaifaalmesbah, sandeepdahiya, sourabhjain, poojapadamad, joedolson.
Fixes #63529.
Built from https://develop.svn.wordpress.org/trunk@61098


git-svn-id: http://core.svn.wordpress.org/trunk@60434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 19:45:32 +00:00
joedolson
a6e40f4437 Twenty Ten: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, denis-de-bernardy, nacin, chriscct7, shreya0shrivastava, sirlouen, sabernhardt, shailu25, westonruter, joedolson.
Fixes #10219.
Built from https://develop.svn.wordpress.org/trunk@61097


git-svn-id: http://core.svn.wordpress.org/trunk@60433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:38:30 +00:00
joedolson
bec4647f16 Twenty Eleven: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, denis-de-bernardy, nacin, chriscct7, shreya0shrivastava, sirlouen, sabernhardt, shailu25, westonruter, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61096


git-svn-id: http://core.svn.wordpress.org/trunk@60432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:36:31 +00:00
joedolson
bb4078cd07 Twenty Twelve: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, shrey0shrivastava, sirlouen, sabernhardt, shailu25, westonruter, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61095


git-svn-id: http://core.svn.wordpress.org/trunk@60431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:26:56 +00:00
joedolson
df0e8da4f8 Twenty Thirteen: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, shrey0shrivastava, sirlouen, sabernhardt, shailu25, westonruter, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61094


git-svn-id: http://core.svn.wordpress.org/trunk@60430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:25:27 +00:00
joedolson
2a9b78b61e Twenty Nineteen: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, shrey0shrivastava, sirlouen, sabernhardt, shailu25, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61093


git-svn-id: http://core.svn.wordpress.org/trunk@60429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:23:25 +00:00
joedolson
78c200bbf1 Twenty Twenty: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, shrey0shrivastava, sirlouen, sabernhardt, shailu25, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61092


git-svn-id: http://core.svn.wordpress.org/trunk@60428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:21:24 +00:00
joedolson
c333f59e22 Twenty Twenty One: Fix post navigation to respect sort order.
Change the labels on post navigation links when the sort order is changed so the labels accurately reflect the target entries.

Previously, if the sort order was reversed, 'Older' or 'Previous' links would navigate to newer entries and 'Newer' or 'Next' links would navigate to older entries.

Props jikamens, dancameron, obenland, shrey0shrivastava, sirlouen, sabernhardt, shailu25, joedolson.
See #10219.
Built from https://develop.svn.wordpress.org/trunk@61091


git-svn-id: http://core.svn.wordpress.org/trunk@60427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 18:19:39 +00:00
Sergey Biryukov
631c1adf1c Editor: Correct error message in WP_Block_Templates_Registry::unregister().
When attempting to unregister a non-existent block template, the error message will now include the template name.

Follow-up to [59073].

Props mukesh27, shailu25.
Fixes #64072.
Built from https://develop.svn.wordpress.org/trunk@61090


git-svn-id: http://core.svn.wordpress.org/trunk@60426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 16:03:31 +00:00
wildworks
3bdd50e5c4 Editor: Add auth_callback to _wp_note_status comment meta.
Adds an `auth_callback` to the `_wp_note_status` comment meta so that only users with the `edit_comment` capability can update this meta field via the REST API. 

This is necessary to ensure that users can properly resolve or reopen Notes.

Props wildworks, adamsilverstein, westonruter, mamaduka, desrosj.
Fixes #64153.
Built from https://develop.svn.wordpress.org/trunk@61089


git-svn-id: http://core.svn.wordpress.org/trunk@60425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 11:56:37 +00:00
Weston Ruter
70e5c2973d General: Add wp_send_late_headers action which fires right before the template enhancement output buffer is flushed.
This adds a (missing) `wp_send_late_headers` action which fires right after the `wp_template_enhancement_output_buffer` filters have applied and right before the output buffer is flushed. The filtered output buffer is passed as an argument to the action so that plugins may do things like send an `ETag` header which is calculated from the content. This action eliminates the need for plugins to hack the `wp_template_enhancement_output_buffer` filter with a high priority to send a late response header. This action compliments the `send_headers` action which is commonly used to send HTTP headers before the template is rendered. Furthermore:

* The template enhancement output buffer is now enabled by default if there is a callback added to either the `wp_template_enhancement_output_buffer` filter or the `wp_send_late_headers` action. 
* The `wp_start_template_enhancement_output_buffer()` callback for the `wp_before_include_template` action is increased from the default of 10 to 1000. This goes with the previous point, so that plugins can add those filters and actions during the `wp_before_include_template` action without having to worry about adding them too late, that is, after `wp_start_template_enhancement_output_buffer()` has run.
* The `wp_send_late_headers` action fires regardless of whether the buffered response is HTML.

Developed in https://github.com/WordPress/wordpress-develop/pull/10381

Follow-up to [60936].

Props westonruter, peterwilsoncc, johnbillion.
See #43258.
Fixes #64126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-30 00:48:34 +00:00
johnjamesjacoby
e697855dd3 Docs: minor white-space correction.
This commit adds a missing space to the `@return` array of `WP_REST_Post_Format_Search_Handler::prepare_item()`.

Props audrasjb, jigar-bhanushali, rollybueno.

See #63166.

Fixes #63218.
Built from https://develop.svn.wordpress.org/trunk@61087


git-svn-id: http://core.svn.wordpress.org/trunk@60423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-10-29 18:35:34 +00:00