Commit Graph

39355 Commits

Author SHA1 Message Date
Sergey Biryukov b45b58c6b6 Site Health: Correct `wp_version_check()` existence verification by performing a request to the Site Health page instead of Dashboard.
Props Clorith, audrasjb.
Fixes #46616.

git-svn-id: https://develop.svn.wordpress.org/trunk@45049 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-28 14:30:12 +00:00
Gary Pendergast c833087131 Post WordPress 5.2 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@45048 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 23:35:41 +00:00
Gary Pendergast 590d29da6c WordPress 5.2 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@45047 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 23:19:08 +00:00
Gary Pendergast e1f54c7db9 Upgrades: Allow upgrades to proceed when a soft failure occurs on package signatures.
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
2019-03-27 23:05:00 +00:00
Sergey Biryukov 0612bb00e0 Plugins: In `wp_update_php_annotation()`, only display the annotation and the surrounding tags if it's not empty.
Props afragen.
Fixes #46678.

git-svn-id: https://develop.svn.wordpress.org/trunk@45045 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 22:36:37 +00:00
Gary Pendergast 1ab6f67ef5 Site Health: Improve the "Copy to clipboard" button.
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
2019-03-27 22:30:26 +00:00
Sergey Biryukov 43c28f913c Plugins: Disable "Update Now" button for plugins that require a higher version of PHP or WordPress.
This complements disabling the "Install Now" button in [43436].

Props afragen.
Fixes #46677. See #43986.

git-svn-id: https://develop.svn.wordpress.org/trunk@45043 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 22:10:37 +00:00
Adam Silverstein 01882f477b Bundled Theme: trigger a new `wp_body_open` action immediately after the opening `body` tag.
* Enables inserting (asynchronous) JavaScript right after the opening `body` tag.
* Add a `wp_body_open` helper function that triggers the `wp_body_open` action.
* Call `wp_body_open` in core themes immediately after the opening `body` tag.

Props joostdevalk, valendesigns, nacin, saracup, jorbin, mikeschinkel, jonnybojangles, lgedeon, Willscrlt, Denis-de-Bernardy, lexiqueen, sky_76, welcher, westonruter, ramiy, joyously.
Fixes #12563.


git-svn-id: https://develop.svn.wordpress.org/trunk@45042 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 21:58:38 +00:00
Andrea Fercia 368016feb2 Accessibility: Simplify the Site Health score indicator.
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
2019-03-27 20:38:07 +00:00
Jonathan Desrosiers 689ffb5918 Administration: Fix Dashicon backwards compatibility issues.
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
2019-03-27 19:58:18 +00:00
Sergey Biryukov b957460b7b Privacy: Ensure the privacy data erase fulfillment email is sent in the locale of the user whose data is being erased (or the site's default locale if they are not a registered user) when the administrator fulfilling the request uses a different locale.
Props desrosj, birgire, garrett-eclipse.
Fixes #44721.

git-svn-id: https://develop.svn.wordpress.org/trunk@45039 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 19:41:01 +00:00
Andrea Fercia e2aa3c5efe Accessibility: Improve the "Alt text" description.
Moves the word "Describe" within the link.

Amends [44900].
See #41612.


git-svn-id: https://develop.svn.wordpress.org/trunk@45038 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 18:46:12 +00:00
John Blackbourn 440a383946 Docs: Correct the documentation for the oEmbed HTML filtering.
See #46543


git-svn-id: https://develop.svn.wordpress.org/trunk@45037 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 17:13:49 +00:00
John Blackbourn 05ac419795 Docs: Improve the documentation for metadata related filter parameters.
See #46543


git-svn-id: https://develop.svn.wordpress.org/trunk@45036 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 17:09:35 +00:00
John Blackbourn 6a3bab9848 Docs: Correct some documentation typos.
See #46543


git-svn-id: https://develop.svn.wordpress.org/trunk@45035 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 17:08:04 +00:00
Sergey Biryukov b2f0f4d2db Taxonomy: Initialize `$noparents` variable in `wp_ajax_add_tag()` to avoid a notice with `compact()` in PHP 7.3.
Props pilou69.
Fixes #46670.

git-svn-id: https://develop.svn.wordpress.org/trunk@45034 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 15:32:11 +00:00
Sergey Biryukov 432d968df6 Docs: Correct back-compat reference to `$excluded_categories` in `get_adjacent_post()`.
See #46543, #17673.

git-svn-id: https://develop.svn.wordpress.org/trunk@45033 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 14:44:31 +00:00
Sergey Biryukov 8e9425e094 Twenty Nineteen: Update `Theme URI` to point to the Theme Directory instead of the archived GitHub repository.
Props dimadin.
Fixes #46668.

git-svn-id: https://develop.svn.wordpress.org/trunk@45032 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 14:31:16 +00:00
Sergey Biryukov fe85d77b48 General: Pass `$pagenum` argument to `get_pagenum_link` filter.
Props dimadin.
Fixes #46667.

git-svn-id: https://develop.svn.wordpress.org/trunk@45031 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 14:23:24 +00:00
Sergey Biryukov 368cd01fa7 Database: Use `wp_die()` instead of `die()` in `wp_check_mysql_version()`, for more flexibility and consistency with other error messages in core.
Props spacedmonkey.
Fixes #45975.

git-svn-id: https://develop.svn.wordpress.org/trunk@45030 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 14:02:47 +00:00
Sergey Biryukov f4e535df1b Bootstrap/Load: Restore `$wp_version` global check in `WP_Locale::init()`, previously replaced with `get_bloginfo( 'version' )` in [38459].
`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
2019-03-27 13:26:50 +00:00
Sergey Biryukov 7ad9fb7e7c Themes: Remove `itemprop="url"` from `get_custom_logo()` output.
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
2019-03-27 12:15:15 +00:00
Sergey Biryukov 716fa97607 Build/Test Tools: Enable persistent object cache on a PHP 7.3 build instead of PHP 5.6.
Props netweb, johnbillion.
Fixes #46633.

git-svn-id: https://develop.svn.wordpress.org/trunk@45027 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 03:05:56 +00:00
Sergey Biryukov a58b5f2f70 Site Health: Update "Passed tests" button label to match both expanded and collapsed state.
Add `aria-controls` to declare what ID is being toggled.

Props Clorith, afercia.
Fixes #46663. See #46573.

git-svn-id: https://develop.svn.wordpress.org/trunk@45026 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 02:56:09 +00:00
Sergey Biryukov c454b24d92 PHPCS: Fix WPCS violations in [45023].
See #46620.

git-svn-id: https://develop.svn.wordpress.org/trunk@45025 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 00:35:34 +00:00
Sergey Biryukov a630f23731 Embeds: Scribd: Add support for `/document/` URL format, in addition to `/doc/`.
Props manzoorwani.jk, neobabis, swissspidy.
Fixes #46444.

git-svn-id: https://develop.svn.wordpress.org/trunk@45024 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 00:33:47 +00:00
Sergey Biryukov b324c419ec Bootstrap/Load: In fatal error handler, pass the error information through to error template and associated filters: `wp_php_error_message`, `wp_php_error_args`.
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
2019-03-27 00:15:23 +00:00
Sergey Biryukov dd7caf0fd3 PHPCS: Remove extra tab added in [45019].
See #45974.

git-svn-id: https://develop.svn.wordpress.org/trunk@45022 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 00:02:34 +00:00
Sergey Biryukov a8e61bfa86 Plugins: Use correct singular for "Drop-in" in plugins list table.
Props tobifjellner, mukesh27.
Fixes #46592.

git-svn-id: https://develop.svn.wordpress.org/trunk@45021 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-26 23:59:39 +00:00
Sergey Biryukov 368ea6bfc5 Build/Test Tools: Display an error message with a recommendation to run `grunt build` when trying to run WordPress core tests without the `/build/` directory.
Props davidbaumwald.
Fixes #46593.

git-svn-id: https://develop.svn.wordpress.org/trunk@45020 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-26 23:52:03 +00:00
Sergey Biryukov cdd034f80f Bootstrap/Load: Use `wp_die()` instead of hardcoded HTML in `wp_maintenance()`, so the output can be filtered by plugins.
Props spacedmonkey.
Fixes #45974.

git-svn-id: https://develop.svn.wordpress.org/trunk@45019 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-26 23:38:37 +00:00
Sergey Biryukov fd2c97766f Docs: Fix typo in `wp_is_xml_request()` description.
See #46026.

git-svn-id: https://develop.svn.wordpress.org/trunk@45018 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-26 23:20:29 +00:00
Sergey Biryukov 20ede58996 Docs: Improve documentation for `wp_die()` handlers after [45015] and [45016].
See #46543, #46025, #46026.

git-svn-id: https://develop.svn.wordpress.org/trunk@45017 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-26 23:17:36 +00:00
Sergey Biryukov 013a095ef4 Bootstrap/Load: Add support for XML requests to `wp_die()`.
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
2019-03-26 23:10:21 +00:00
Sergey Biryukov d270e8eb02 Bootstrap/Load: Add support for JSONP requests to `wp_die()`.
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
2019-03-26 22:25:47 +00:00
Sergey Biryukov fb7c39f88d Bootstrap/Load: Always run the fatal error handler at shutdown, but don't display the PHP error template once headers are sent.
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
2019-03-26 20:29:52 +00:00
John Blackbourn a1cd087b6e Build/Test tools: Reinstate fast finishing on Travis CI.
This allows for speedier feedback for breaking changes and ongoing failures.

See #46634


git-svn-id: https://develop.svn.wordpress.org/trunk@45004 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 16:07:01 +00:00
John Blackbourn cf6026d64d Build/Test tools: Switch npm dependency caching strategy on Travis CI.
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
2019-03-25 00:51:12 +00:00
Andrea Fercia c2fd19e12d Admin: Site Health JavaScript minor clean-up.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/trunk@44988 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 16:38:48 +00:00
Sergey Biryukov 448ed1adfc Privacy: Update default privacy policy text to match the current behavior of setting a temporary cookie on visiting the login page.
Props mechter, subrataemfluence, garrett-eclipse.
Fixes #44175.

git-svn-id: https://develop.svn.wordpress.org/trunk@44987 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 10:53:20 +00:00
Gary Pendergast dad6b61cfb Admin: Introduce the Site Health screens.
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
2019-03-23 03:54:16 +00:00
Adam Silverstein 7793e670b8 Multisite: add new `sites_pre_query` and `networks_pre_query` filters to short circuit WP_Site_Query and WP_Network_Query queries.
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
2019-03-22 17:25:38 +00:00
Aaron Jorbin 42547da41d PHP: Bump minimum version
95% of 5.6 sites are on 5.6.30 or higher, hence this specific minimum version.

Fixes #46594.




git-svn-id: https://develop.svn.wordpress.org/trunk@44982 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-22 15:46:56 +00:00
Sergey Biryukov 96922900c5 Plugins: Remove `wp_is_wp_compatible()` and `wp_is_php_compatible()` functions added in [44978] for now, to discuss use cases and better naming.
See #46599, #43992.

git-svn-id: https://develop.svn.wordpress.org/trunk@44981 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-22 12:59:02 +00:00
Sergey Biryukov d69b5eb713 Plugins: Use `<em>` instead of `<span>` for PHP annotation in `wp_plugin_update_row()`, for consistency with other instances.
Props afragen.
Fixes #46598. See #43987.

git-svn-id: https://develop.svn.wordpress.org/trunk@44980 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-22 01:07:51 +00:00
Sergey Biryukov 0e1d2b42ef PHPCS: Fix WPCS violations in [44978].
See #43992.

git-svn-id: https://develop.svn.wordpress.org/trunk@44979 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-22 00:59:25 +00:00
Sergey Biryukov 1586c43c8d Plugins: Block plugin activation if it requires a higher version of PHP or WordPress.
Introduce `validate_plugin_requirements()` for validating a plugin's WordPress and PHP version requirements.

Introduce `wp_is_wp_compatible()` and `wp_is_php_compatible()` for checking compatibility with the current WordPress or PHP version.

Props afragen, joyously, DrewAPicture, TimothyBlynJacobs, desrosj, flixos90, SergeyBiryukov.
See #43992.

git-svn-id: https://develop.svn.wordpress.org/trunk@44978 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-22 00:36:30 +00:00
Jonathan Desrosiers f170c1dd31 Networks and Sites: Introduce the `ms_user_list_site_class` filter.
In the network admin user table on multisite installs (`WP_MS_Users_List_Table`), this filter allows the classes for the `<span>` tag surrounding each site link to be modified.

Props kraftbj, flixos90, johnjamesjacoby.
Fixes #41146.

git-svn-id: https://develop.svn.wordpress.org/trunk@44977 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 23:54:05 +00:00
Sergey Biryukov 531d83a2f0 I18N: Move the strings for default user roles to `wp-includes/capabilities.php`, to make the translations available on the front end as well.
Props keraweb, ocean90.
Fixes #37539.

git-svn-id: https://develop.svn.wordpress.org/trunk@44976 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 22:23:00 +00:00
Sergey Biryukov fa0190bcb1 Customize: Add a link to theme reviews in the theme details modal in the Customizer and on Add Themes screen.
Props celloexpressions, Travel_girl, Ixium, marco-peralta, dd32.
Fixes #36612.

git-svn-id: https://develop.svn.wordpress.org/trunk@44975 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 22:01:42 +00:00