Commit Graph

39344 Commits

Author SHA1 Message Date
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
Felix Arntz
4be7a863ff Bootstrap/Load: Fix WPCS violation in a new test following [44973].
See #46130.


git-svn-id: https://develop.svn.wordpress.org/trunk@44974 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:59:12 +00:00
Felix Arntz
1f3912e9bf Bootstrap/Load: Introduce a recovery mode for fixing fatal errors.
Using the new fatal handler introduced in [44962], an email is sent to the admin when a fatal error occurs. This email includes a secret link to enter recovery mode. When clicked, the link will be validated and on success a cookie will be placed on the client, enabling recovery mode for that user. This functionality is executed early before plugins and themes are loaded, in order to be unaffected by potential fatal errors these might be causing.

When in recovery mode, broken plugins and themes will be paused for that client, so that they are able to access the admin backend despite of these errors. They are notified about the broken extensions and the errors caused, and can then decide whether they would like to temporarily deactivate the extension or fix the problem and resume the extension.

A link in the admin bar allows the client to exit recovery mode.

Props timothyblynjacobs, afragen, flixos90, nerrad, miss_jwo, schlessera, spacedmonkey, swissspidy.
Fixes #46130, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44973 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:52:07 +00:00
Sergey Biryukov
57a38bed47 PHPCS: Remove extra tabs added in [44970].
See #44237.

git-svn-id: https://develop.svn.wordpress.org/trunk@44972 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:35:37 +00:00
Sergey Biryukov
864c3f07df Privacy: Use a consistent URL for Privacy Policy guide.
Props garrett-eclipse, mukesh27, birgire, desrosj.
Fixes #44876.

git-svn-id: https://develop.svn.wordpress.org/trunk@44971 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:16:52 +00:00
Sergey Biryukov
e987281597 Comments: Introduce comment_flood_message and comment_duplicate_message filters for comment flood and duplicate comment error messages.
Props odminstudios, Katyatina, mukesh27.
Fixes #44237.

git-svn-id: https://develop.svn.wordpress.org/trunk@44970 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:09:47 +00:00
Adam Silverstein
e1a070bb87 Media: introduce a "Heading" view for improved accessibility.
* Add a new media view: `wp.media.view.Heading` designed to add accessibility friendly headers in the media library/modal.
* Add an initial "Attachments list" heading above the attachments list.

Props afercia.
Fixes #36925.


git-svn-id: https://develop.svn.wordpress.org/trunk@44969 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:04:49 +00:00
Sergey Biryukov
393738de41 PHPCS: Remove extra spaces added in [44966].
See #44005.

git-svn-id: https://develop.svn.wordpress.org/trunk@44968 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 20:19:16 +00:00
Sergey Biryukov
c86ff5da2d Users: Introduce users_have_additional_content filter to indicate whether the users being deleted have additional content associated with them outside of the post_author and link_owner relationships.
Props garrett-eclipse, xkon, birgire.
Fixes #36860.

git-svn-id: https://develop.svn.wordpress.org/trunk@44967 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 20:11:29 +00:00
Sergey Biryukov
65bd3654cc Privacy: Introduce Privacy Policy page helpers:
* `is_privacy_policy()` template tag
* `privacy-policy.php` template
* `.privacy-policy` body class
* `.menu-item-privacy-policy` menu item class

Props garrett-eclipse, birgire, xkon, Clorith.
Fixes #44005.

git-svn-id: https://develop.svn.wordpress.org/trunk@44966 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 19:47:29 +00:00
K. Adam White
49d8c2590c REST API: Avoid undefined-property notice when setting parent term to 0.
Only try to access `term_id` once `$parent_term` is known to be a `WP_Term`.

Props dlh, earnjam.
Fixes #44983.


git-svn-id: https://develop.svn.wordpress.org/trunk@44965 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 18:58:50 +00:00
Andrea Fercia
9a129eec78 Upgrade/Install: Add missing opening curly bracket after [44513].
Props WebFactory.
Fixes #46563.


git-svn-id: https://develop.svn.wordpress.org/trunk@44964 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 18:02:53 +00:00