The `load` event (on `window`) fires after all resources on a page have been loaded, including images. This means that
on a slow connection, the mobile nav menu button may be rendered yet unresponsive to taps between when it first appears
and when the page has fully loaded. This is rectified by switching to the `DOMContentLoaded` event so that the nav menu
behaviors are attached as soon as the DOM has fully loaded.
Reviewed by audrasjb.
Merges [60352] to the 6.8 branch.
Props gernberg, westonruter, sabernhardt.
Fixes#63613.
Built from https://develop.svn.wordpress.org/branches/6.8@60423
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Include the image height and width in the attributes passed to the `wp_get_attachment_image_attributes` filter. Developers can use this to adjust the width and height attributes returned from the `wp_get_attachment_image_attributes` function.
Reviewed by audrasjb.
Merges [60415] to the 6.8 branch.
Props divinenephron, nacin, Sam_a, wpsmith, anatolbroder, ericlewis, puggan, SergeyBiryukov, spacedmonkey, adamsilverstein, flixos90, sandeepdahiya, SirLouen.
Fixes#14110.
Built from https://develop.svn.wordpress.org/branches/6.8@60420
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Browser support for client-side validation is now reliable. Blocking the form submission when there is a missing/invalid field prevents the possibility of losing comment content when bfcache does not restore the previous page when going back.
To retain the `novalidate` attribute, the `comment_form()`'s args now accepts a `novalidate` key which will add the attribute when it is `true`. This can also be supplied by the `comment_form_default_fields filter`, for example:
{{{
add_filter( 'comment_form_defaults', function ( $args ) {
$args['novalidate'] = true;
return $args;
} );
}}}
Reviewed by audrasjb.
Merges [60304] to the 6.8 branch.
Fixes#47595.
Props westonruter, joedolson, sabernhardt, afercia, SergeyBiryukov, guddu1315, pfefferle, oglekler, bugnumber9.
Built from https://develop.svn.wordpress.org/branches/6.8@60412
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `sanitize_file_name()` function normalizes the no-break space to a normal space (`U+0020`) in order to prevent issues saving files with the no-break space in it.
This patch expands the replacement to all space characters, since it’s known that macOS stores a `NARROW NO-BREAK SPACE` (`U+202F`) in screenshot filenames between the time and the am/pm indicator.
There are deeper issues with the way this function works, but this patch resolves a known and common problem without raising any of the deeper refactoring questions.
Reviewed by audrasjb, youknowriad.
Merges [60399] to the 6.8 branch.
Props audrasjb, desrosj, dmsnell, jonsurrell, matt, room34, siliconforks, zieladam, annezazu.
Fixes#62995.
Built from https://develop.svn.wordpress.org/branches/6.8@60411
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On small screens, the restore revision button was mostly hidden due to excessive constraints on overflow height. Fix the overflow issue and ensure that restore revision buttons are always usable.
Reviewed by audrasjb.
Merges [60259] to the 6.8 branch.
Props yogeshbhutkar, getsyash, joedolson.
Fixes#63029.
Built from https://develop.svn.wordpress.org/branches/6.8@60410
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Screencast have updated their URL structure to use a sub-domain and the prior oEmbed endpoint in the allow list now returns a 410 Gone response.
For discussion regarding the legacy endpoint refer to #61941, comment #35 onwards.
Merges [60345] to the 6.8 branch.
See #61941.
Props audrasjb, brhodes, dustintechsmith, joedolson, johnbillion, nikunj8866, paulstanos, peterwilsoncc, sandeepdahiya, sergeybiryukov, sirlouen, swissspidy.
Built from https://develop.svn.wordpress.org/branches/6.8@60354
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces support for Emoji 16:
- replaces emoji support test with splatter ,
- replaces two letter coded flag support test with Sark 🇨🇶,
- introduces the function `emojiRendersEmptyCenterPoint()` to the emoji loader to enable testing of emoji with a single data point.
Not to harp on about it, but Emoji 16 is perfect for tiring yourself out digging up root vegetables while visiting Sark 🇨🇶.
Reviewed by audrasjb.
Merges [60227] to the 6.8 branch.
Props westonruter, kraftbj, pento, JeffPaul, abcd95, SergeyBiryukov, dd32, peterwilsoncc.
Fixes#63324.
Built from https://develop.svn.wordpress.org/branches/6.8@60317
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces tests to ensure the version numbers in `package-lock.json` (two instances) and `composer.json` match the WordPress version specified in `version.php`.
In pull requests, the `package-lock.json` file is updated automatically to match the version in `package.json`. The new test is intended to ensure the version numbers are correct in production branches.
Reviewed by jorbin.
Merges [60219], [60221] to the 6.8 branch.
Fixes#63390.
Built from https://develop.svn.wordpress.org/branches/6.8@60223
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The lack of a specified version in the composer.json file is causing some unexpected warnings.
Reviewed by peterwilsoncc.
Merges [60211], [60212] to the 6.8 branch with appropriate version number modifications.
Props sirlouen, johnbillion, TobiasBg, desrosj, jorbin.
See #63167.
Built from https://develop.svn.wordpress.org/branches/6.8@60218
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This restores the 6.7 and below behavior for the posts endpoint which did not include sticky posts by default.
Follow-up to [59801].
Reviewed by desrosj.
Merges [60197] to the 6.8 branch.
Props nikunj8866, SirLouen, ankitmaru, wildworks, karthikeya01, Mamaduka, spacedmonkey, jorbin.
Fixes#63307. See #35907.
Built from https://develop.svn.wordpress.org/branches/6.8@60200
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While having a mime type with an "image" prefix, SVG images are in fact "Scalable Vector Graphics" that can be scaled directly.
Follow-up to [60084].
Reviewed by desrosj.
Backports [60195] to the 6.8 branch.
Props sirlouen, adamsilverstein, audrasjb, pbiron, sainathpoojary, dilipbheda, pratiklondhe.
Fixes#63302. See #61167.
Built from https://develop.svn.wordpress.org/branches/6.8@60196
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This reverts [59910] and changes the "Edit Site" link to be the current template rather than the top-level screen of the Site Editor.
Reviewed by SergeyBiryukov, desrosj.
Merges [60193] to the 6.8 branch.
Props wildworks, joemcgill, poena, westonruter, nickwilmot, marktimemedia, eduwass, lilgames, codeamp, jeffr0, jorbin.
Fixes#63358. See #62368.
Built from https://develop.svn.wordpress.org/branches/6.8@60194
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In finalizing the 6.8 announcement post (https://wordpress.org/news/2025/04/cecil/) it was identified that some of the copy on the 6.8 about page is not an accurate description of what is in 6.8. This copy is receiving a game misconduct penalty and automatic ejection. While the coach could bring on a substitute, a line change is the better option here.
Reviewed by joedolson.
Merges [60183] to the 6.8 branch.
Props abcd95, mukesh27, JeffPaul.
Fixes#63323.
Built from https://develop.svn.wordpress.org/branches/6.8@60190
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As of [59523], Block Hooks are applied to post content. In order to allow for insertion of a hooked block as first_child or last_child of the containing Post Content block, we wrap the block's post content (as obtained from the DB) in a temporary <!-- wp:post-content --> wrapper block, apply the Block Hooks algorithm to the resulting markup, and remove the wrapper block. (The same technique is applied for the Synced Pattern block -- see [59543] -- as well as the Navigation block.)
However, this caused a problem when a hooked block was marked for insertion before before or after a Post Content block: The logic that's supposed to remove the temporary wrapper block after the Block Hooks algorithm runs erroneously removed that hooked block's delimiter instead of the wrapper block, producing garbled markup as a result.
This changeset fixes the issue by adding a hooked_block_types filter (with PHP_INT_MAX priority) that removes any blocks hooked before or after a Post Content block, if the current context is a post object. This prevents any blocks hooked that way from being "absorbed" into the corresponding post object's content; it retains the ability to hook blocks before and after a Post Content block in any other context (e.g. a template). (The same principle is applied to Synced Pattern and Navigation blocks.)
Reviewed by Jorbin.
Merges [60173] to 6.8 branch.
Props obenland, jorbin, gziolo, bernhard-reiter.
Fixes#63287.
Built from https://develop.svn.wordpress.org/branches/6.8@60189
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because validation was added in [59134] to prevent submitting bulk actions with no selected action, sites that remove or change the default bulk actions can fail due to the missing required inputs. Add a filter (bulk_action_observer_ids) that allows modifying the actions accepted to fulfill validation rules.
Reviewed by Jorbin.
Merges [60186] to the 6.8 branch.
Props ethitter, kabir93, jorbin, davidbaumwald, joedolson.
Fixes#63005.
Built from https://develop.svn.wordpress.org/branches/6.8@60188
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[59696] changed the 'Text' tab of the classic editor to 'Code' but Code was already used as a key in the array of translatable text. Since arrays keys need to be unique, this meant that it is possible for the wrong translation to appear in a locale. Using different keys fixes that.
Reviewed by joedolson.
Merges [60182] to the 6.8 branch.
Props joedolson, sabernhardt, justlevine, swissspidy, audrasjb.
Fixes#63269. See #38061.
Built from https://develop.svn.wordpress.org/branches/6.8@60187
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When using a non-direct filesystem, the call in WP_Upgrader::maintenance_mode() did not include the required credentials, leading to a fatal error as the connection was not initialized properly.
This commit attempts to use the stored credentials if available, and triggers a notice otherwise.
Follow-up to [56341], [58128].
Reviewed by jorbin.
Merges [60107] to the 6.8 branch.
Props SirLouen, hideishi, dd32, tusharaddweb, takuword, SergeyBiryukov.
Fixes#62718.
Built from https://develop.svn.wordpress.org/branches/6.8@60184
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes a call to the `is_super_admin()` function in `ms-files.php` as the function isn't available when using the `SHORTINIT` feature, causing fatal errors on systems using file rewrites.
Reverts [59967].
Reviewed by jorbin.
Merges [60170] to the 6.8 branch.
Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill.
See #36803.
Fixes#63285.
Built from https://develop.svn.wordpress.org/branches/6.8@60171
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
An update for these two default themes will not be released in coordination with WordPress 6.8 due because there were no changes to the source code during the release cycle. However, they should be considered tested with 6.8, and this ensures that the next release properly indicates that.
Reviewed by joemcgill.
Merges [60158] to the 6.8 branch.
Props shailu25, sabernhardt, desrosj, poena, audrasjb.
See #62990.
Built from https://develop.svn.wordpress.org/branches/6.8@60161
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[59775] resulted in a backwards compatibility break in a now deprecated experimental component, which was stabilized to `LinkControl`. When experimental components are deprecated in favor of being stabilized, the same backwards compatibility policy applies and the shape of the component should not change.
This restores the static properties that were unintentionally removed from the `__experimentalLinkControl` component that was moved to `DeprecatedExperimentalLinkControl`.
Reviewed by joemcgill, wildworks.
Merges [60150] to the 6.8 branch.
Props karthikeya01, mamaduka, joemcgill, fabiankaegy, wildworks.
Fixes#62887.
Built from https://develop.svn.wordpress.org/branches/6.8@60156
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since [59872] all PHP files in the 'patterns' directory or subdirectories are auto registered. Adding a filter prior to autoregistration allows theme developers to modify the list of files before the auto registration.
Reviewed by audrasjb.
Merges [60142] to the 6.8 branch
Props webmandesign, joemcgill, jorbin, poena.
Fixes#63212.
Built from https://develop.svn.wordpress.org/branches/6.8@60144
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes failing unit tests on the Hosting test suite because of the hardcoded table name in `WP_Test_REST_Users_Controller::test_get_items_only_fetches_ids_for_head_requests`.
Reviewed by audrasjb, spacedmonkey.
Merges [60141] to the 6.8 branch.
Props antonvlasenko, desrosj.
Fixes#56481.
Built from https://develop.svn.wordpress.org/branches/6.8@60143
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a PHP Warning for an undefined array key "QUERY_STRING" in `_wp_get_site_editor_redirection_url()` in some PHP configurations.
Depending on the configuration, `$_SERVER['QUERY_STRING']` can either be unset or an empty string when no query string included in the URL. This changes the condition from a falsey check to an `empty()` check.
Reviewed by Mamaduka.
Merges [60134] to the 6.8 branch.
Props akshaydhere, dilipbheda, johnbillion, rainynewt, sabernhardt, sainathpoojary, shovan_jaya, tusharaddweb, wildworks.
Fixes#63224.
Built from https://develop.svn.wordpress.org/branches/6.8@60135
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Corrects the type for the `$time` and `$previous_time` parameters in the filter to indicate the times are expressed as strings. The values are generated from a call to `microtime()` which returns the time as a string in the form `msec sec`.
Reviewed by audrasjb.
Merges [60128] to the 6.8 branch.
Props tillkruess, westonruter.
Fixes#63194.
Built from https://develop.svn.wordpress.org/branches/6.8@60133
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
These tests are not critical to the bcrypt functionality, they exist to reaffirm that the underlying use of `password_hash()` and `password_verify()` supports this algorithm. The Argon2 tests therefore shouldn't unnecessarily fail on hosts that don't support it.
Reviewed by desrosj.
Merges [60124] to the 6.8 branch.
Props desrosj, johnbillion.
Fixes#21022.
Built from https://develop.svn.wordpress.org/branches/6.8@60126
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Application passwords that aren't hashed using BLAKE2b should be checked using wp_check_password() rather than assuming they were hashed with phpass. This provides full back compat support for application passwords that were created via an overridden wp_hash_password() function that uses an alternative hashing algorithm.
Reviewed by audrasjb.
Merges [60123] into the 6.8 branch.
Props snicco, debarghyabanerjee, peterwilsoncc, jorbin, johnbillion.
Fixes#63203
Built from https://develop.svn.wordpress.org/branches/6.8@60125
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is a follow-up to [60038], which updates the PHPUnit tests to account for different systems producing potentially different hashes due to platform specific floating point precision settings.
Reviewed by audrasjb, desrosj.
Merges [60113] to the 6.8 branch.
Props debarghyabanerjee, joemcgill, peterwilsoncc, siliconforks.
Fixes#63175.
Built from https://develop.svn.wordpress.org/branches/6.8@60116
git-svn-id: http://core.svn.wordpress.org/branches/6.8@59452 1a063a9b-81f0-0310-95a4-ce76da25c4cd