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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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