Fixes a performance regression starting the loop after calling `WP_Query( [ 'fields' => 'all' ] )`. This changes how `WP_Query::the_post()` determines whether there is a need to traverse the posts for cache warming.
If IDs are queried, `WP_Query::$posts` is assumed to be an array of post IDs. If all fields are queried, `WP_Query::$posts` is assumed to be an array of fully populated post objects.
Follow up to [59919], [59937].
Props joemcgill, peterwilsoncc, SirLouen.
Fixes#56992.
Built from https://develop.svn.wordpress.org/trunk@59993
git-svn-id: http://core.svn.wordpress.org/trunk@59335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adjust the position of the skip link in viewports between 600 and 782 pixels, where they were hidden due to `overflow-y: auto` in the block editor. Ensures that the skip link is visibly available for users on all viewport sizes.
Props sabernhardt, narenin, audrasjb, mukesh27, joedolson, wildworks.
Fixes#63084.
Built from https://develop.svn.wordpress.org/trunk@59992
git-svn-id: http://core.svn.wordpress.org/trunk@59334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Several significant animations in the customizer did not respect prefers reduced motion. Change CSS to wrap animations in `@media` queries to verify user preferences.
Props wildworks, sainathpoojary, abcd95, joedolson, audrasjb.
Fixes#62806.
Built from https://develop.svn.wordpress.org/trunk@59989
git-svn-id: http://core.svn.wordpress.org/trunk@59331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When some screen option input fields are changed (post table columns, welcome panel, and metabox visibility), the change is saved to options. Other screen options (e.g. number of items per page) are only saved on submit. The changes that are saved immediately are visibly changed for sighted readers immediately. Change adds a `wp.a11y.speak()` call to inform screen readers that a value change has updated screen options.
Props kkmuffme, joedolson, yogeshbhutkar, audrasjb, sourabhjain.
Fixes#62550.
Built from https://develop.svn.wordpress.org/trunk@59988
git-svn-id: http://core.svn.wordpress.org/trunk@59330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the 'muted' attribute to the audio shortcode. Fix boolean attributes to meet HTML5 standards. Replaces instances like `attr="1"` with `attr` for `loop`, `autoplay`, and `muted`, and improves handling of the `preload` attribute to only output valid values.
Props shub07, dmsnell, debarghyabanerjee, audrasjb, narenin, apermo, joedolson.
Fixes#61515.
Built from https://develop.svn.wordpress.org/trunk@59987
git-svn-id: http://core.svn.wordpress.org/trunk@59329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change the `onclick` attribute to a separate inlined script in the error message and improve the event attachment behavior.
Props vivekawsm, mijotj, adamsilverstein, parthvataliya, adhun, sarathar, peterwilsoncc, sayedulsayem, chaion07, sppramodh, indirabiswas27, aishwarryapande, dhrumilk, manojmaharrshi, ugyensupport, imranhasanraaz, pkbhatt, shailu25, joedolson.
Fixes#60074.
Built from https://develop.svn.wordpress.org/trunk@59986
git-svn-id: http://core.svn.wordpress.org/trunk@59328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [59630].
See #62278.
Built from https://develop.svn.wordpress.org/trunk@59985
git-svn-id: http://core.svn.wordpress.org/trunk@59327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There are several files generated and updated by the build process that are under version control. Including changes to these files is a common missed step for contributors regardless of experience level.
This introduces a workflow that checks for changes to versioned files as a result of other changes in pull requests and commits them back to the head branch. Because this workflow requires the `pull_request_target` event instead of `pull_request`, local references to reusable workflows should never be used.
In addition to improving the contributor experience, this also opens the door to use Dependabot for monitoring npm dependencies, many of which produce changes to built files when updating.
Props desrosj, johnbillion, joemcgill, swissspidy.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59983
git-svn-id: http://core.svn.wordpress.org/trunk@59325 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].
Props hideishi, dd32, SergeyBiryukov.
Fixes#62718.
Built from https://develop.svn.wordpress.org/trunk@59981
git-svn-id: http://core.svn.wordpress.org/trunk@59323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[54687] introduced a fallback stylesheet for Button block styles (and later File blocks) for both the front end and the editor. In the editor, that has been added within the body, after the theme's block styles. That commit had quick fixes for Twenty Twelve and Twenty Twenty, but raising the specificity for those colors should have been unnecessary. Also, themes such as Twenty Fourteen — and non-bundled themes — still have had a similar problem with the incorrect order.
Thus, this changeset:
- Registers the stylesheet outside `wp_enqueue_classic_theme_styles()`.
- Enqueues classic styles in the `enqueue_block_assets` action instead of adding them in the `block_editor_settings_all` filter.
- Deprecates the `wp_add_editor_classic_theme_styles()` function.
Follow-up to [54687].
Props sabernhardt, mukesh27.
Fixes#61892.
Built from https://develop.svn.wordpress.org/trunk@59980
git-svn-id: http://core.svn.wordpress.org/trunk@59322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes the `aria-describedby` attribute when not editing the current user, as no description paragraph is associated.
Props kkmuffme, audrasjb, faisal03, shailu25, nandow, eddystile, marineevain, qhaensler, virginienacci.
Fixes#63006.
Built from https://develop.svn.wordpress.org/trunk@59978
git-svn-id: http://core.svn.wordpress.org/trunk@59320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [59889] the REST API controllers were adjusted to perform less work when responding to HEAD requests. The WP_REST_Response body would now be `null`, which caused issues with filters that expected the response body to be an array.
This commit sets the response body to be an empty array when preparing the response instead. The body will still be discarded, but this provides better backward comppatibility with code that assumes an array will be used.
See #56481.
Props antonvlasenko, timothyblynjacobs, mamaduka, wildworks.
Built from https://develop.svn.wordpress.org/trunk@59970
git-svn-id: http://core.svn.wordpress.org/trunk@59312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes an issue introduced in [59885] whereby calling `WP_Theme:is_block_theme()` before themes are set up resulted in the parent theme to not be resolved. To address this, post support for editor default-mode has been moved to a standalone callback, `wp_set_editor_default_mode()`, which is called on the `after_setup_theme` hook. In addition, if `WP_Theme::is_block_theme` is called too early, a `_doing_it_wrong()` error will now be thrown.
Props fabiankaegy, joemcgill, peterwilsoncc, jorbin, krupajnanda, riddhidave, ugyensupport, navi161, manojmaharrshi, Ankit K Gupta, narenin, shailu25, pooja1210.
Fixes#63062.
Built from https://develop.svn.wordpress.org/trunk@59968
git-svn-id: http://core.svn.wordpress.org/trunk@59310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue in multisite installations where archived sites remain accessible to network administrators, but the associated files do not. The previous implementation was checking if the blog is archived, marked as spam, or deleted, to subsequently return a 404 error for file requests. However, this did not account for network administrators who should retain access to these files.
Props antwortzeit, jeremyfelt, debarghyabanerjee, audrasjb.
Fixes#36803.
Built from https://develop.svn.wordpress.org/trunk@59967
git-svn-id: http://core.svn.wordpress.org/trunk@59309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset ensures that pagination links stay consistent with the chosen permalink structure. When the permalink structure uses a trailing slash, pagination permalinks contain one as well, but when the permalink structure doesn't use trailing slash, then pagination links should not use a trailing slash.
This makes use of `user_trailingslashit()` with a `paged` value for the `type_of_url` parameter.
Props hmbashar, huzaifaalmesbah, rejaulalomkhan, mai21, rahulsprajapati, martinkrcho, ankitkumarshah, adamsilverstein, sourabhjain.
Fixes#61393.
Built from https://develop.svn.wordpress.org/trunk@59966
git-svn-id: http://core.svn.wordpress.org/trunk@59308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The active theme(s) now return two additional properties, `default_template_types` and `default_template_part_areas`, in the REST response.
Props mamaduka, joemcgill, timothyblynjacobs, audrasjb, gigitux, peterwilsoncc, youknowriad, jorbin.
Fixes#62574.
Built from https://develop.svn.wordpress.org/trunk@59965
git-svn-id: http://core.svn.wordpress.org/trunk@59307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates the `external-http` group in the PHPUnit test suite to include all tests that rely on network requests. This is to ensure the main test suite runs do not contain any tests that can fail due to network conditions.
Props sukhendu2002, azaozz, audrasjb.
Fixes#62325.
Built from https://develop.svn.wordpress.org/trunk@59964
git-svn-id: http://core.svn.wordpress.org/trunk@59306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The current `esversion` 6 corresponds to an ECMAScript version from a decade ago (2015). Updating from 6 to 10 allows the following features to be used in Core JS: the exponentiation operator, async functions, shared memory, atomics, asynchronous iteration, rest/spread properties, various RegExp extensions, and optional catch bindings. These features have been supported by all browsers (except for IE11) well beyond WordPress's browser support policy. This also brings Core's allowed ES version closer in line with Gutenberg which is currently using features like async functions.
Props westonruter, swissspidy, mukesh27.
Fixes#63077.
Built from https://develop.svn.wordpress.org/trunk@59963
git-svn-id: http://core.svn.wordpress.org/trunk@59305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change several error message across core to use WordPress standard styling. Ensure only prefixes are wrapped in `strong` tags rather than the whole message, use `notice notice-error` classes where appropriate, and replace a custom error with `wp_admin_notice()` in multisite.
Props afercia, rajinsharwar, robinmartijn, mukesh27, sabernhardt, oglekler, joedolson, chaion07, im3dabasia1, audrasjb, dkarfa, najmulsaju.
Fixes#50402.
Built from https://develop.svn.wordpress.org/trunk@59960
git-svn-id: http://core.svn.wordpress.org/trunk@59302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset updates `wp_video_shortcode()` to improve boolean attributes handling in accordance with HTML5 standards. Technically, it replaces `attr="1"` with `attr` for the `loop`, `autoplay` and `muted` attributes. The `preload` attribute is also updated to accept only allowed values: `none`, `metadata`, and `auto`. If a value outside of this list is provided, it will be ignored, preventing invalid attribute outputs.
Props jongycastillo, sabernhardt, joedolson, audrasjb, shub07, debarghyabanerjee.
Fixes#60178.
Built from https://develop.svn.wordpress.org/trunk@59954
git-svn-id: http://core.svn.wordpress.org/trunk@59296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes both a visual and functional bug related to template selection in the editor that occurred when having a custom block template registered that was using the same slug as another block template already registered by the theme, including the default block templates.
Props aljullu, antonvlasenko, apermo, audrasjb, azaozz, ntsekouras.
Fixes#62319.
Built from https://develop.svn.wordpress.org/trunk@59951
git-svn-id: http://core.svn.wordpress.org/trunk@59293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add URL validation in the admin navigation menu manager that matches the validation in the customizer when adding custom links. Improve accessibility of both custom link forms by adding `aria-invalid` and `aria-describedby` attributes with visible error messages and announcing the error using `wp.a11y.speak()`.
Props joedolson, nikitasolanki1812, akrocks, pathan-amaankhan, rcreators, ironprogrammer, audrasjb, ankit-k-gupta, chaion07, rinkalpagdar, snehapatil02, jainil07, parthvataliya.
Fixes#60619, #60969.
Built from https://develop.svn.wordpress.org/trunk@59948
git-svn-id: http://core.svn.wordpress.org/trunk@59290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Using strict comparison and `$wpdb::prepare()`.
* Removing one-time variables so that `$wpdb::prepare()` calls are picked up correctly by PHPCS.
* Bringing consistency to the type of internal variables, i.e. `$thismonth` and `$thisyear` are both an integer now.
Follow-up to [508], [509], [510], [716], [933], [12590], [34463], [44809], [47223], [59908].
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59947
git-svn-id: http://core.svn.wordpress.org/trunk@59289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset replaces `sanitize_text_field()` with `esc_url_raw()` for URLs passed via `url` and `return` query vars. This fixes an issue where the URL `example.com/หน้าภาษาไทย` would incorrectly return `example.com//` due to improper sanitization when clicking on the Customize button through the admin bar.
Props okvee, yahaly, hellofromTonya, veryard, dilip2615, amin7, swissspidy, audrasjb.
Fixes#61317.
Built from https://develop.svn.wordpress.org/trunk@59945
git-svn-id: http://core.svn.wordpress.org/trunk@59287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes Cafelog links from `licence.txt` and `readme.html` files as the domain was purchased by another entity, providing unsafe content.
Props gencmedya, audrasjb, JeffPaul, peterwilsoncc, jorbin, johnbillion.
Fixes#63000.
Built from https://develop.svn.wordpress.org/trunk@59944
git-svn-id: http://core.svn.wordpress.org/trunk@59286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset restricts direct access call to `/wp-content/plugins/hello.php`, and removes the "Uncaught exception Error" warning that shows when `WP_DEBUG` is enabled and when accessing the related file directly.
Props deepakrohilla, SergeyBiryukov, szepeviktor, audrasjb.
Fixes#61214.
Built from https://develop.svn.wordpress.org/trunk@59943
git-svn-id: http://core.svn.wordpress.org/trunk@59285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes some issues where Select fields were misaligned with neighboring elements, creating visual inconsistency in the customizer.
Props rkradadiya, mukesh27, laxman-prajapati, dlh, karmatosed, ankitkumarshah, sabernhardt.
Fixes#51249.
Built from https://develop.svn.wordpress.org/trunk@59942
git-svn-id: http://core.svn.wordpress.org/trunk@59284 1a063a9b-81f0-0310-95a4-ce76da25c4cd