In particular, this allows downgrading from WordPress 5.2 to 5.1.1, if sites wish to opt out of the beta.
Props dd32.
See #46615.
git-svn-id: https://develop.svn.wordpress.org/trunk@45046 602fd350-edb4-49c9-b593-d223f7449a82
The previous method for copying the debug report to the clipboard involved having a hidden `<textarea>`, but this shows up in screen readers and can't be reliably hidden.
To work around this, the button now uses the `clipboard.js` library, which automatically handles browser differences in the Clipboard API, and can load the text to copy from a `data-` attribute on the button.
Props pento, hedgefield, afercia.
Fixes#46647.
git-svn-id: https://develop.svn.wordpress.org/trunk@45044 602fd350-edb4-49c9-b593-d223f7449a82
The Site Health score indicator isn't exactly a "progress bar" and shouldn't use ARIA roles and properties related to progress bars. Also, some browser / screen reader combinations don't announce the score properly.
- removes any ARIA
- adds a screen-reader-text "Current health score:"
- adds `role="img" aria-hidden="true" focusable="false"` to the SVG
- reduces CSS specificity simplifying unnecessary overqualified selectors
- fixes the syntax for ::after and ::before (double colon)
Fixes#46621.
git-svn-id: https://develop.svn.wordpress.org/trunk@45041 602fd350-edb4-49c9-b593-d223f7449a82
In [44940], the Dashicon files in core were updated to contain the latest version of the font from the GitHub repo. This change follows that up by fixing several backwards compatibility issues caused by the new build process used to generate the font files and fixes the missing menu icon when viewing the admin on small screens.
- `buddicons-bbpress-logo (f12b)` was moved back to the correct location of `f477`.
- `editor-ltr (f129)` was moved back to the correct location of `f10c`.
- `email-alt2 (f10a)` was moved to the correct location of `f467`.
The following icons were restored to their previous locations:
- `camera-alt (f129)`
- `edit-large (f327)`
- `editor-distractionfree (f211)`
- `update-alt (f113)`
- `twitter-alt (f302)`
- `text-page (f121)`
- `plugins-checked (f485)`
- `menu-alt3 (f349)`
- `menu-alt2 (f329)`
- `menu-alt (f228)`
- Duplicate lock icon at location `f315`
- Duplicate `editor-code` icon at location `f494`
- `arrow-up` at `f143`.
The `editor-ltr` and `editor-rtl` icons had also been switched. The arrows now point in the correct directions at the correct Unicode locations (`f10c` and `f320` respectively).
And, lastly, this change also introduces the `code-standards (f13a)` icon that was not included in the previous build.
Props afercia, earnjam, oztaser, joen, cathibosco1, ianbelanger, desrosj.
See #41074.
Fixes#46611.
git-svn-id: https://develop.svn.wordpress.org/trunk@45040 602fd350-edb4-49c9-b593-d223f7449a82
`wp_load_translations_early()` can be called in contexts where `get_bloginfo()` is not available yet, e.g. in `wp_check_php_mysql_versions()`.
Props shazdeh, parsmizban.
Fixes#41092.
git-svn-id: https://develop.svn.wordpress.org/trunk@45029 602fd350-edb4-49c9-b593-d223f7449a82
Making incorrect assumptions about microdata used in a theme results in invalid markup.
The attribute can still be added using the `get_custom_logo` or `wp_get_attachment_image_attributes` filter, but it should not be added by default.
Props henry.wright, tfrommen, afercia, markcallen, zodiac1978.
Fixes#37305.
git-svn-id: https://develop.svn.wordpress.org/trunk@45028 602fd350-edb4-49c9-b593-d223f7449a82
This allows the custom error handler and default error message filters to inspect the error and perform logic based on its properties.
Props johnbillion.
Fixes#46620.
git-svn-id: https://develop.svn.wordpress.org/trunk@45023 602fd350-edb4-49c9-b593-d223f7449a82
In addition to AJAX, XML-RPC, JSON, and JSONP requests, `wp_die()` now handles XML requests correctly, returning information in the expected content type.
Props spacedmonkey, birgire.
Fixes#46026. See #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@45016 602fd350-edb4-49c9-b593-d223f7449a82
In addition to AJAX, XML-RPC, and JSON requests, `wp_die()` now handles JSONP requests correctly, returning information in the expected content type.
Props spacedmonkey, TimothyBlynJacobs.
Fixes#46025. See #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@45015 602fd350-edb4-49c9-b593-d223f7449a82
If a fatal error occurs midway through a page load, or in a REST API request, it still needs to be handled internally for the recovery mode, but the custom message may conflict with already rendered output, e.g. by displaying HTML markup in an XML or JSON request.
Props spacedmonkey, flixos90, TimothyBlynJacobs.
Fixes#45989. See #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@45014 602fd350-edb4-49c9-b593-d223f7449a82
This switches to caching npm's local cache instead of `node_modules` in order to prevent issues caused by modules compiled using a different version of node.
See #46632
git-svn-id: https://develop.svn.wordpress.org/trunk@44993 602fd350-edb4-49c9-b593-d223f7449a82
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.
By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.
Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.
git-svn-id: https://develop.svn.wordpress.org/trunk@44986 602fd350-edb4-49c9-b593-d223f7449a82
Similar to the `posts_pre_query` filter for WP_Query added in #36687. These filters lets you short circuit the queries to return your own results.
Add a new filter `sites_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_sites` queries.
Developers should note that filtering functions that require pagination information are encouraged to set the `found_sites` property of the `WP_Site_Query` object, passed to the filter by reference. If `WP_Site_Query` does not perform a database query, it will not have enough information to generate these values itself.
Add a new filter `networks_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_networks` queries.
Developers should note that filtering functions that require pagination information are encouraged to set the `found_networks` property of the `WP_Network_Query` object, passed to the filter by reference. If `WP_Network_Query` does not perform a database query, it will not have enough information to generate these values itself.
Props spacedmonkey.
Fixes#45749.
git-svn-id: https://develop.svn.wordpress.org/trunk@44983 602fd350-edb4-49c9-b593-d223f7449a82