Allow submenus in Twenty Twenty to be dismissed using the `esc` key to meet WCAG 1.4.13. Set focus to previous submenu parent on `esc`, and ensure that after escaping the last submenu, tab moves to the next parent item, not back into the submenu.
Props lcarevic, rcreators, pratiklondhe, poena, karmatosed, chaion07, audrasjb, mehdi01, mohonchandra, najmulsaju, saurabhdhariwal, ugyensupport, shailu25.
Fixes#49950.
git-svn-id: https://develop.svn.wordpress.org/trunk@60040 602fd350-edb4-49c9-b593-d223f7449a82
This changeset updates the class used for the theme wrapper in the customizer, which fixes an alignment issue occuring when searching a theme on WordPress.org from the customizer interface.
Props kharisblank, ankitkumarshah, benazeer, sainathpoojary, mukesh27, kharisblank, parthvataliya, im3dabasia1, sukhendu2002, praful2111, ruchirj, imranhasanraaz, shailu25.
Fixes#62637.
git-svn-id: https://develop.svn.wordpress.org/trunk@60039 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [59968] which improves error handling for when `wp_is_block_theme()` is called too early. Initially, `_doing_it_wrong()` was called in `WP_Theme::is_block_theme()` was called prior to themes being set up, in order to avoid the bug reported in #63062, where doing so would cause parent themes to not be resolved. After further investigation, the issue is only caused by calling `wp_is_block_theme()` before the root theme directory has been registered (e.g., when called on the `muplugins_loaded` hook).
Moving This error message to `wp_is_block_theme()` when `$GLOBALS['wp_theme_directories']` is empty avoids unnecessary error messages.
Props wildworks, sukhendu2002, SirLouen, dinhtungdu, narenin, joemcgill, peterwilsoncc, afragen.
Fixes#63086. See #63062.
git-svn-id: https://develop.svn.wordpress.org/trunk@60037 602fd350-edb4-49c9-b593-d223f7449a82
This version adds support for the latest emoji added in Unicode Emoji 15.1.
I will rise like a phoenix 🐦🔥 but you’re my flame 🔥.
Props audrasjb, azaozz, hbhalodia, jorbin, sergeybiryukov, sirlouen.
Fixes#63064.
git-svn-id: https://develop.svn.wordpress.org/trunk@60035 602fd350-edb4-49c9-b593-d223f7449a82
Since `ABSPATH` is defined and documented to end with a forward slash `/`, this changeset removes the first `/` from strings appended to `ABSPATH` in various files, leading to `//` in the resulting path.
Follow-up to [54872], [55720], [57545].
Props dhruvik18, SergeyBiryukov.
Fixes#63102.
git-svn-id: https://develop.svn.wordpress.org/trunk@60034 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow up to [59968], which moves the `wp_set_editor_default_mode()` callback to `init` to make sure the subsequent call to `create_initial_post_types()` doesn't overwrite the post type support settings.
Props mamaduka, psykro.
Fixes#61811.
git-svn-id: https://develop.svn.wordpress.org/trunk@60033 602fd350-edb4-49c9-b593-d223f7449a82
If the author display name is unknown, show an `emdash` and screen reader text `(no author)`, consistent with other cases where information is unknown. Fix an issue where an unknown author name displayed as an invisible link with no text.
Props kkmuffme, hdkothari81, shailu25, snehapatil02, sabernhardt, faisal03, rishavdutta, sumitbagthariya16, joedolson.
Fixes#62913.
git-svn-id: https://develop.svn.wordpress.org/trunk@60032 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that the button to insert a gallery is disabled until all image uploads have completed on the Edit Gallery screen. Prevents an issue where users could insert a gallery with some images missing.
Props: adamsilverstein, gonom9, rishavdutta.
Fixes: #39824.
git-svn-id: https://develop.svn.wordpress.org/trunk@60031 602fd350-edb4-49c9-b593-d223f7449a82
Only test PDF alpha functionality when supported by the server.
Props: adamsilverstein, swissspidy, antpb, sippis.
Fixes#60798.
git-svn-id: https://develop.svn.wordpress.org/trunk@60030 602fd350-edb4-49c9-b593-d223f7449a82
Shifts the `title` attribute on `more` and `page-break` placeholder images to `alt`, moves the `title` attribute to `alt` on the `style` and `script` placeholders and replaces the images to differentiate between CSS and JS content.
Props sabernhardt, abcd95, joedolson.
Fixes#62861.
git-svn-id: https://develop.svn.wordpress.org/trunk@60007 602fd350-edb4-49c9-b593-d223f7449a82
In older branches utilizing Puppeteer instead of Playwright, installing Playwright browsers is unnecessary and resulting in workflow failures.
This introduces a new `install-playwright` input that allows older branches to indicate that Playwright related steps should be skipped.
See #63117.
git-svn-id: https://develop.svn.wordpress.org/trunk@60005 602fd350-edb4-49c9-b593-d223f7449a82
The reusable E2E workflow does not yet follow the `-v#` pattern because there is only one version.
The current pattern is not matching the `reusable-end-to-end-tests.yml` file.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60004 602fd350-edb4-49c9-b593-d223f7449a82
This allows the Site Editor to load a preview of the site as an `IFRAME_REQUEST` by checking for a `wp_site_preview` query param. By setting the `IFRAME_REQUEST` constant when loading the preview, the site's admin bar and some third party plugin overlays will not be shown in the preview.
Props wildworks, joemcgill, peterwilsoncc, presstoke, mamaduka, johnbillion, faisal03.
Fixes#63076.
git-svn-id: https://develop.svn.wordpress.org/trunk@60003 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59993 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59992 602fd350-edb4-49c9-b593-d223f7449a82
Improvement following [59914] to make the position of the skip to content link consistent across different states and viewports.
Props sabernhardt, himanshupathak95, joedolson.
Fixes#62969.
git-svn-id: https://develop.svn.wordpress.org/trunk@59991 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59989 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59988 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59987 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59985 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59983 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59981 602fd350-edb4-49c9-b593-d223f7449a82
[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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59980 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59978 602fd350-edb4-49c9-b593-d223f7449a82
This adds the `new-version` input to the concurrency group name to prevent manually dispatched workflow runs from cancelling each other when different versions are being tested.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59973 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59970 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59968 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59967 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59966 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@59965 602fd350-edb4-49c9-b593-d223f7449a82