Commit Graph

7097 Commits

Author SHA1 Message Date
Andrew Ozz
4601e178e5 Site health: fix usage of max_execution_time. When PHP is run from the cli the default is 0.
Fixes #46645.
Built from https://develop.svn.wordpress.org/trunk@45111


git-svn-id: http://core.svn.wordpress.org/trunk@44920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-04 21:54:53 +00:00
desrosj
adbaba7d56 Site Health: Ensure the user locale is listed in debug information.
This change switches to using `get_user_locale()` when adding the language to the Site Health debug information to ensure the user’s locale preference is reflected.

Also, `function_exists()` checks for `switch_to_locale()` and `restore_previous_locale()` were required in the plugin to support older versions of WordPress, but they are not required in core/

Props: Clorith, desrosj.
Fixes #46694.
Built from https://develop.svn.wordpress.org/trunk@45110


git-svn-id: http://core.svn.wordpress.org/trunk@44919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-04 21:24:52 +00:00
Sergey Biryukov
4ee7d453fa Site Health: Use wp_get_upload_dir() instead of wp_upload_dir(), remove duplicate call.
Props m_uysl.
Fixes #46729.
Built from https://develop.svn.wordpress.org/trunk@45108


git-svn-id: http://core.svn.wordpress.org/trunk@44917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-03 11:20:51 +00:00
Sergey Biryukov
991eb4258d Site Health: Use correct property for database-related messages.
Props mukesh27, birgire.
Fixes #46783.
Built from https://develop.svn.wordpress.org/trunk@45107


git-svn-id: http://core.svn.wordpress.org/trunk@44916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-03 11:01:53 +00:00
Sergey Biryukov
ef948cbfd6 PHPCS: Fix WPCS violations in [45104].
See #46645.
Built from https://develop.svn.wordpress.org/trunk@45106


git-svn-id: http://core.svn.wordpress.org/trunk@44915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-03 02:14:51 +00:00
Sergey Biryukov
5d0bd0ec47 Site Health: Use a consistent verbiage for the suggestion to remove inactive plugins and themes.
Props garrett-eclipse, marybaum, Clorith.
Fixes #46735.
Built from https://develop.svn.wordpress.org/trunk@45105


git-svn-id: http://core.svn.wordpress.org/trunk@44914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-03 02:01:51 +00:00
Andrew Ozz
2cdc22aded Site health:
- Prevent fatal errors from timeouts on the Tools => Site Health => Info tab.
- Use the `get_dirsize()` and `recurse_dirsize()` functions to calculate directory sizes. The results are cached.
- Introduce "timeout protection" in `recurse_dirsize()`.

Props pento, Clorith, xkon, afercia, jeremyfelt, azaozz.
Fixes #46645.
Built from https://develop.svn.wordpress.org/trunk@45104


git-svn-id: http://core.svn.wordpress.org/trunk@44913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 23:33:53 +00:00
Sergey Biryukov
0c92764023 Site Health: Use an established pattern for numbered placeholders in translator comments in WP_Debug_Data.
See #46683.
Built from https://develop.svn.wordpress.org/trunk@45102


git-svn-id: http://core.svn.wordpress.org/trunk@44911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 22:18:52 +00:00
Sergey Biryukov
f7357d3957 Site Health: i18n audit, take 1.
* Split plural strings with multiple sentences to avoid duplicating translations.
* Decouple strings where the singular and plural form are not just the same string with different numbers, but essentially two different strings.
* Use an established pattern for numbered placeholders in translator comments.
* Replace constants in translatable strings with placeholders, mark them as code.
* Make sure sentences are translated as a whole, not as separate string parts.
* Remove unnecessary context and escaping.

Props ocean90, SergeyBiryukov.
See #46683.
Built from https://develop.svn.wordpress.org/trunk@45099


git-svn-id: http://core.svn.wordpress.org/trunk@44908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 21:32:53 +00:00
Sergey Biryukov
5291f46c8a Docs: Fix typo in a comment in unzip_file().
Props mukesh27.
Fixes #46766.
Built from https://develop.svn.wordpress.org/trunk@45098


git-svn-id: http://core.svn.wordpress.org/trunk@44907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 13:34:53 +00:00
Sergey Biryukov
474f57e0fa Site Health: Add missing i18n for Security and Performance badge labels.
Props iworks.
Fixes #46755. See #46683.
Built from https://develop.svn.wordpress.org/trunk@45095


git-svn-id: http://core.svn.wordpress.org/trunk@44904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 10:08:56 +00:00
Sergey Biryukov
ccbf084609 Docs: Fix more typos in WP_Site_Health DocBlocks.
See #46753.
Built from https://develop.svn.wordpress.org/trunk@45094


git-svn-id: http://core.svn.wordpress.org/trunk@44903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 20:30:52 +00:00
Sergey Biryukov
12a2bf946a Docs: Fix typos in WP_Site_Health DocBlocks.
Props mukesh27.
Fixes #46753.
Built from https://develop.svn.wordpress.org/trunk@45093


git-svn-id: http://core.svn.wordpress.org/trunk@44902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 20:23:50 +00:00
Sergey Biryukov
9c8e9354b1 Docs: Add missing @since tag for WP_Site_Health::get_test_php_extensions().
Props mukesh27.
Fixes #46752.
Built from https://develop.svn.wordpress.org/trunk@45092


git-svn-id: http://core.svn.wordpress.org/trunk@44901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 20:17:54 +00:00
Sergey Biryukov
0aedea9470 Docs: Improve documentation for get_plugin_page_hook() and get_plugin_page_hookname().
Props subrataemfluence, desrosj.
Fixes #44224.
Built from https://develop.svn.wordpress.org/trunk@45085


git-svn-id: http://core.svn.wordpress.org/trunk@44894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 14:09:52 +00:00
Sergey Biryukov
06d8f376ea PHPCS: Fix WPCS violation in [45082].
See #42223.
Built from https://develop.svn.wordpress.org/trunk@45084


git-svn-id: http://core.svn.wordpress.org/trunk@44893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 13:30:52 +00:00
Sergey Biryukov
733ec3da48 Docs: Improve documentation for postbox_classes().
Rename `$page` and `$id` variables to `$screen_id` and `$box_id` for clarity.

Props sharifkiberu, DrewAPicture.
Fixes #45179.
Built from https://develop.svn.wordpress.org/trunk@45083


git-svn-id: http://core.svn.wordpress.org/trunk@44892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 12:47:51 +00:00
Sergey Biryukov
2f5b5baa07 I18N: Merge similar strings about allowed space allocation in Multisite.
Props ramiy, Jonathandejong, pento.
Fixes #42223.
Built from https://develop.svn.wordpress.org/trunk@45082


git-svn-id: http://core.svn.wordpress.org/trunk@44891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 12:24:51 +00:00
Sergey Biryukov
de95fac19c Themes: Link to an updated documentation on child themes on developer.wordpress.org, instead of Codex.
Props man4toman.
See #46450.
Built from https://develop.svn.wordpress.org/trunk@45080


git-svn-id: http://core.svn.wordpress.org/trunk@44889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 11:55:52 +00:00
Sergey Biryukov
5cca79f806 Site Health: If WP_DEBUG_LOG contains a file path, display it on Site Info tab.
Props xkon, knutsp, ocean90.
Fixes #46692.
Built from https://develop.svn.wordpress.org/trunk@45079


git-svn-id: http://core.svn.wordpress.org/trunk@44888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 01:26:51 +00:00
Sergey Biryukov
c241c16846 Site Health: Simplify the checks for constants that are always defined by default.
Props xkon.
Fixes #46738.
Built from https://develop.svn.wordpress.org/trunk@45078


git-svn-id: http://core.svn.wordpress.org/trunk@44887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 00:10:53 +00:00
Sergey Biryukov
44602b5ed9 Docs: Fix typos in site_status_tests filter DocBlock.
Props kraftbj.
Fixes #46727.
Built from https://develop.svn.wordpress.org/trunk@45073


git-svn-id: http://core.svn.wordpress.org/trunk@44882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-30 10:58:52 +00:00
Sergey Biryukov
10409c0f7c Privacy: Ensure the personal data export email is sent in the locale of the user whose data is being exported (or the site's default locale if they are not a registered user) when the administrator fulfilling the request uses a different locale.
Props garrett-eclipse.
Fixes #46056.
Built from https://develop.svn.wordpress.org/trunk@45062


git-svn-id: http://core.svn.wordpress.org/trunk@44871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 21:29:50 +00:00
Sergey Biryukov
a02494a80f Site Health: Add description for a successful HTTPS check.
Props Clorith, xkon.
Fixes #46617.
Built from https://develop.svn.wordpress.org/trunk@45052


git-svn-id: http://core.svn.wordpress.org/trunk@44861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 16:15:51 +00:00
Sergey Biryukov
d69165bd3b 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.
Built from https://develop.svn.wordpress.org/trunk@45049


git-svn-id: http://core.svn.wordpress.org/trunk@44858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 14:31:51 +00:00
Gary Pendergast
0a4d431e11 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.


Built from https://develop.svn.wordpress.org/trunk@45046


git-svn-id: http://core.svn.wordpress.org/trunk@44855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 23:05:54 +00:00
Gary Pendergast
65f7cdbce0 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.


Built from https://develop.svn.wordpress.org/trunk@45044


git-svn-id: http://core.svn.wordpress.org/trunk@44853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 22:31:52 +00:00
Sergey Biryukov
179c2ea230 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.
Built from https://develop.svn.wordpress.org/trunk@45043


git-svn-id: http://core.svn.wordpress.org/trunk@44852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 22:11:53 +00:00
Sergey Biryukov
7807324652 Taxonomy: Initialize $noparents variable in wp_ajax_add_tag() to avoid a notice with compact() in PHP 7.3.
Props pilou69.
Fixes #46670.
Built from https://develop.svn.wordpress.org/trunk@45034


git-svn-id: http://core.svn.wordpress.org/trunk@44843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 15:33:52 +00:00
Sergey Biryukov
b2e3f517e1 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.
Built from https://develop.svn.wordpress.org/trunk@45030


git-svn-id: http://core.svn.wordpress.org/trunk@44839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 14:03:51 +00:00
Sergey Biryukov
6037e5ab5e Plugins: Use correct singular for "Drop-in" in plugins list table.
Props tobifjellner, mukesh27.
Fixes #46592.
Built from https://develop.svn.wordpress.org/trunk@45021


git-svn-id: http://core.svn.wordpress.org/trunk@44830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 00:00:50 +00:00
Sergey Biryukov
8ea4da0826 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.
Built from https://develop.svn.wordpress.org/trunk@44987


git-svn-id: http://core.svn.wordpress.org/trunk@44818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 10:54:53 +00:00
Gary Pendergast
0a9d61ab63 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.

Built from https://develop.svn.wordpress.org/trunk@44986


git-svn-id: http://core.svn.wordpress.org/trunk@44817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 03:55:53 +00:00
Sergey Biryukov
50bb3c689f 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.
Built from https://develop.svn.wordpress.org/trunk@44981


git-svn-id: http://core.svn.wordpress.org/trunk@44812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 13:00:52 +00:00
Sergey Biryukov
79e9aa9ed6 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.
Built from https://develop.svn.wordpress.org/trunk@44980


git-svn-id: http://core.svn.wordpress.org/trunk@44811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:08:51 +00:00
Sergey Biryukov
8954465943 PHPCS: Fix WPCS violations in [44978].
See #43992.
Built from https://develop.svn.wordpress.org/trunk@44979


git-svn-id: http://core.svn.wordpress.org/trunk@44810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:00:52 +00:00
Sergey Biryukov
75a3e484ec 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.
Built from https://develop.svn.wordpress.org/trunk@44978


git-svn-id: http://core.svn.wordpress.org/trunk@44809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 00:37:50 +00:00
desrosj
36af5473be 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.
Built from https://develop.svn.wordpress.org/trunk@44977


git-svn-id: http://core.svn.wordpress.org/trunk@44808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 23:55:51 +00:00
Sergey Biryukov
8dcd3a09a8 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.
Built from https://develop.svn.wordpress.org/trunk@44976


git-svn-id: http://core.svn.wordpress.org/trunk@44807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:23:52 +00:00
Sergey Biryukov
30491f2410 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.
Built from https://develop.svn.wordpress.org/trunk@44975


git-svn-id: http://core.svn.wordpress.org/trunk@44806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:02:51 +00:00
Felix Arntz
3a77265148 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.

Built from https://develop.svn.wordpress.org/trunk@44973


git-svn-id: http://core.svn.wordpress.org/trunk@44804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:53:51 +00:00
Sergey Biryukov
7d74080b80 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.
Built from https://develop.svn.wordpress.org/trunk@44966


git-svn-id: http://core.svn.wordpress.org/trunk@44797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 19:48:50 +00:00
Andrea Fercia
03bd75f053 Upgrade/Install: Add missing opening curly bracket after [44513].
Props WebFactory.
Fixes #46563.

Built from https://develop.svn.wordpress.org/trunk@44964


git-svn-id: http://core.svn.wordpress.org/trunk@44795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 18:03:51 +00:00
Sergey Biryukov
99b929cbbc Accessibility: Remove post format filter links from format icons in the Posts list table.
Introduce a dedicated 'Formats' drop-down filter as a replacement.

Keep the icons as a simple visual indicator of the post format for now.

Props afercia, melchoyce, GaryJ, chiaralovelaces, SergeyBiryukov.
Fixes #35497.
Built from https://develop.svn.wordpress.org/trunk@44961


git-svn-id: http://core.svn.wordpress.org/trunk@44792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 15:32:01 +00:00
desrosj
899e7d3800 Posts, Post Types: Add type parameter to post_exists().
This allows post exists checks scoped to a specific post type.

Props sgarza, birgire, swissspidy.
Fixes #37406.
Built from https://develop.svn.wordpress.org/trunk@44959


git-svn-id: http://core.svn.wordpress.org/trunk@44790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:44:54 +00:00
tellyworth
e38814f359 Upgrade/Install: Add experimental package signing to some updates.
This adds code for soft verification of signatures for theme and plugin installs and updates, when provided by the update server. This experimental version does not reject unverified packages or failed signatures; it simply reports anonymous errors so we can evaluate its feasibility and detect incompatibilities.

This code relies on the new sodium_compat library for PHP versions prior to 7.2.

Props dd32, paragoninitiativeenterprises.
See #39309, #45806.

Built from https://develop.svn.wordpress.org/trunk@44954


git-svn-id: http://core.svn.wordpress.org/trunk@44785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 05:49:50 +00:00
aduth
9cf4ee65a7 Scripts: Assign api-fetch nonce with corrected rest_nonce.
As of `@wordpress/api-fetch@3.0.0` (introduced in 44812), the `apiFetch` nonce middleware must have its nonce value assigned explicitly, and will no longer listen for heartbeat ticks automatically. This changeset adds an inline script for the default registration of the `api-fetch` script handle to assign the nonce value in response to the heartbeat action. In doing so, it removes the now-unused, misnamed `rest-nonce` property from the heartbeat response, whose original introduction served as temporary compatibility with earlier versions of `@wordpress/api-fetch`.

See https://github.com/WordPress/gutenberg/pull/13451
See #45113

Props adamsilverstein, nerrad .
Fixes #46107 .

Built from https://develop.svn.wordpress.org/trunk@44949


git-svn-id: http://core.svn.wordpress.org/trunk@44780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:53:50 +00:00
Dominik Schilling
c32bc04fdc Meta Boxes: Use a unique name for the nonce of the meta box loader.
Fixes a case where saving in the block editor fails if there are two `_wpnonce` arguments in the request, one overriding the other so that `use_block_editor_for_post()` wasn't able to check the nonce properly.

Props Chouby.
See #45253.
Built from https://develop.svn.wordpress.org/trunk@44938


git-svn-id: http://core.svn.wordpress.org/trunk@44769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 08:12:51 +00:00
desrosj
fae24d54fe Plugins: Block plugin updates if required PHP version is not supported.
When a plugin states it requires a specific minimum PHP version (as defined in the `requires_php` field included in the plugin update API response), a user should not be allowed to update that plugin when the server does not satisfy the minimum PHP version.

When this scenario is encountered, the update buttons and links are disabled and links to educational resources about PHP are displayed to the user with a notice.

Props afragen, schlessera, desrosj.
Fixes #43987. 
Built from https://develop.svn.wordpress.org/trunk@44937


git-svn-id: http://core.svn.wordpress.org/trunk@44768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 01:44:51 +00:00
desrosj
612a0c8c80 General: Prevent nested paragraph tags when displaying PHP update annotations.
This change utilizes the new parameters accepted by `wp_update_php_annotation()` introduced in [44935] to prevent nested `<p>` tags when displaying the PHP update annotation.

Props afragen, desrosj.
Fixes #46269.
Built from https://develop.svn.wordpress.org/trunk@44936


git-svn-id: http://core.svn.wordpress.org/trunk@44767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-19 20:41:53 +00:00
Andrea Fercia
e901bc4c2b Accessibility: Improve the Comments and Privacy count text.
- standardizes the Comment count string to `%s Comment in moderation', '%s Comments in moderation` so it can be bulk-updated
- adds the string as visually hidden text in the admin menu 
- introduces an `updateInModerationText` JS simple function, responsible to correctly update all the related text using the data from the AJAX response
- adds a visually hidden text "1 Privacy Policy update" to the Privacy menu items count
- adds/improves translators comments

Changes that apply to all the count bubbles (Updates, plugins, etc.)
- makes the bubbles and their text slightly bigger
- improves the active menu item bubble contrast by changing the background color to red (option 2 in the screenshot attached in a previous comment)

Props adamsoucie, afercia.
Fixes #33030.

Built from https://develop.svn.wordpress.org/trunk@44924


git-svn-id: http://core.svn.wordpress.org/trunk@44755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-18 15:22:53 +00:00
Sergey Biryukov
72b33ec883 Docs: Correct grammar in PemFTP description.
Props umang7.
Fixes #46507.
Built from https://develop.svn.wordpress.org/trunk@44920


git-svn-id: http://core.svn.wordpress.org/trunk@44751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:20:49 +00:00
Sergey Biryukov
2ba199472f Docs: Use 3-digit, x.x.x style semantic versioning for @since 2.5.0 entries in wp-admin/includes/class-ftp.php.
Missed in [26868].

Props mukesh27.
See #46507.
Built from https://develop.svn.wordpress.org/trunk@44919


git-svn-id: http://core.svn.wordpress.org/trunk@44750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:18:50 +00:00
desrosj
c84bb94796 Networks and Sites: Introduce populate_site_meta filter.
The `populate_site_meta` filter can be used to modify the site meta added during the creation of a new site. This filter mirrors the approach used for networks in `populate_network_meta`.

Props spacedmonkey, davidbaumwald.
Fixes #46437.
Built from https://develop.svn.wordpress.org/trunk@44912


git-svn-id: http://core.svn.wordpress.org/trunk@44743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 19:43:50 +00:00
desrosj
2019967721 Privacy: Improve data export/erasure error messages and translator comments.
These changes address inaccuracies in current messages and makes them more informative.

Props birgire, garrett-eclipse, desrosj.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@44908


git-svn-id: http://core.svn.wordpress.org/trunk@44739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 18:07:50 +00:00
Andrea Fercia
8f69ebf812 Accessibility: Improve the semantics of "tabs" that are not real ARIA tabs.
Some "visual tabs" in the WordPress admin used links wrapped in a `h2` heading. While these tabs look like ARIA tabs, they're just navigation menus and should be marked-up as such to be correctly exposed to assistive technologies.
- changes the wrapping `<h2>` to a `<nav>` element: worth reminding `<nav>` elements also define ARIA landmarks
- adds an `aria-label` to the `<nav>` elements so they can be distinguished from other `<nav>` elements in the page
- adjusts the headings level in the Credits page

Props audrasjb, afercia.
Fixes #43398.

Built from https://develop.svn.wordpress.org/trunk@44905


git-svn-id: http://core.svn.wordpress.org/trunk@44736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 14:54:52 +00:00
Andrea Fercia
72979b167d Accessibility: Improve the placeholder "prompt" text in the post title and Quick Draft widget.
Old browsers didn't support the HTML placeholder attribute. For a number of years, `<label>` elements have been used in a few places in WordPress to emulate placeholders. It's time to improve semantics and interaction, use real placeholders when possible, and clean up some JavaScript.

- Quick Draft widget: it now uses visible `<label>` elements and a real `placeholder` attribute 
- removes the related JavaScript
- Post title:
  - keeps the "prompt" label for backwards compatibility
  - improves the JavaScript to make the "prompt" label stay visible on focus and disappear when typing, like real placeholder do
- changes the post "prompt" text from "Enter title here" to "Add title" for consistency with the Block Editor 
- cleans-up some CSS

Props Cheffheid, afercia.
Fixes #42390.

Built from https://develop.svn.wordpress.org/trunk@44896


git-svn-id: http://core.svn.wordpress.org/trunk@44727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 17:39:53 +00:00
Sergey Biryukov
0292de60ec Comments: Improve comment content filtering.
Built from https://develop.svn.wordpress.org/trunk@44842


git-svn-id: http://core.svn.wordpress.org/trunk@44674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:30:50 +00:00
desrosj
26ab5fcee1 Privacy: Be less restrictive of the HTML tags allowed in user data exports.
Previously, only `a` and `br` tags were allowed in the `value` table cell for each field included in the HTML file generated when a user is exporting their personal data. Instead of relying on a hardcoded list of allowed tags, the `wp_kses()` call in `wp_privacy_generate_personal_data_export_group_html()` will now fallback to the default list of allowed tags (which includes `i`, `strong`, `em`, and other basic HTML formatting tags).

Also, a new context of `personal_data_export` will now be passed to the `wp_kses()` call. As a result, the list of HTML tags and attributes allowed in the export file can now be filtered using the `wp_kses_allowed_html` filter and checking for the `personal_data_export` context.

Fixes #44044.
Props tz-media, desrosj, pento, birgire, garrett-eclipse.
Built from https://develop.svn.wordpress.org/trunk@44824


git-svn-id: http://core.svn.wordpress.org/trunk@44656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 22:05:53 +00:00
Boone Gorges
401d3c1b51 Taxonomy: Introduce post_column_taxonomy_links.
This filter allows plugin developers to modify the markup for the links
in taxonomy columns on edit.php.

Props DaveFX.
Fixes #42669.
Built from https://develop.svn.wordpress.org/trunk@44822


git-svn-id: http://core.svn.wordpress.org/trunk@44654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 15:37:52 +00:00
desrosj
2b100c8151 Privacy: Add missing header text for screen readers to privacy list tables.
In [34891], `WP_Screen` was updated with methods to store, retrieve, and render screen reader text used by screens with `WP_List_Table` instances. When the export/erase personal data list tables were introduced in [42967], these headings were missing.

Fixes #46041.
Props afercia, xkon, garrett-eclipse, desrosj.
Built from https://develop.svn.wordpress.org/trunk@44821


git-svn-id: http://core.svn.wordpress.org/trunk@44653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 15:25:51 +00:00
desrosj
ec417a34a7 General: Add a way to specify a direct link for a user to update PHP.
A direct URL to where a user can update PHP for their website can now be specified in one of two ways:

- Defining the `WP_DIRECT_UPDATE_PHP_URL` environment variable.
- Returning a URL to the `wp_direct_php_update_url` filter.

When a URL is specified, an additional “Update PHP” button will be displayed at the bottom of the Core dashboard widget informing administrators that their site is running an outdated version of PHP (see [42832]).

Fixes #46074.
Props afragen, desrosj, lukecarbis.
Built from https://develop.svn.wordpress.org/trunk@44814


git-svn-id: http://core.svn.wordpress.org/trunk@44646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 21:32:50 +00:00
Sergey Biryukov
d2f9cbf7be Users: Use login__in parameter for WP_User_Query in WP_MS_Users_List_Table::prepare_items(), instead of a manual query.
Props spacedmonkey.
Fixes #45223.
Built from https://develop.svn.wordpress.org/trunk@44813


git-svn-id: http://core.svn.wordpress.org/trunk@44645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 12:35:52 +00:00
Sergey Biryukov
5658305b1c Date/Time: Reduce explicit local current_time( 'timestamp' ) usage in favor of native PHP functions.
Timestamps don't carry any timezone information, using the intended format directly simplifies the logic and makes the code less confusing.

Props Rarst, jdgrimes.
See #40657.
Built from https://develop.svn.wordpress.org/trunk@44809


git-svn-id: http://core.svn.wordpress.org/trunk@44641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:12:51 +00:00
Boone Gorges
c1cc5e3153 Taxonomy: Add level-n classes to rows on edit-tags.php.
Props johnjamesjacoby.
Fixes #38810.
Built from https://develop.svn.wordpress.org/trunk@44804


git-svn-id: http://core.svn.wordpress.org/trunk@44636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 03:04:50 +00:00
Sergey Biryukov
5e3ae17d61 I18N: Remove trailing spaces from translatable strings introduced in [43436].
Props dimadin.
Fixes #46277.
Built from https://develop.svn.wordpress.org/trunk@44797


git-svn-id: http://core.svn.wordpress.org/trunk@44629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 20:14:49 +00:00
Felix Arntz
3120fe36c9 General: Introduce wp_is_php_version_acceptable filter to make the check for triggering PHP version warnings stricter.
The filter is only run if the wordpress.org API considers the PHP version acceptable. This ensures that other plugins or hosting providers can only make this check stricter, but not loosen it.

Props j-falk, mikeschroder.
Fixes #46065.

Built from https://develop.svn.wordpress.org/trunk@44788


git-svn-id: http://core.svn.wordpress.org/trunk@44620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 21:14:50 +00:00
desrosj
9bbf751fd7 Privacy: Remove privacy feature related admin pointers.
In 4.9.6, several new privacy related features were introduced. Admin pointers were included to make administrators aware of these features. They have served their purpose and can now go silently into the night.

Props garrett-eclipse, desrosj, xkon.
Fixes #45999.
Built from https://develop.svn.wordpress.org/trunk@44787


git-svn-id: http://core.svn.wordpress.org/trunk@44619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 20:47:50 +00:00
Aaron Jorbin
71cf332e65 Replace usages of basename() with wp_basename() in order to support multibyte filenames
This is focused on the pieces of code that touch media files and the tests that support them. `basename` isn't multibyte compatible out of the box. See http://php.net/basename and https://bugs.php.net/bug.php?id=62119.

See #43170.
Props Viper007Bond.

Built from https://develop.svn.wordpress.org/trunk@44785


git-svn-id: http://core.svn.wordpress.org/trunk@44617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-01 20:58:52 +00:00
Sergey Biryukov
e57fcaeeee Privacy: Escape Privacy Policy guide URL in in Privacy Policy edit page notice.
Props itowhid06, garrett-eclipse.
Fixes #44761.
Built from https://develop.svn.wordpress.org/trunk@44779


git-svn-id: http://core.svn.wordpress.org/trunk@44611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 12:08:49 +00:00
Sergey Biryukov
abf27c3b62 Privacy: Return a more accurate error message when the user cannot perform the requested action.
Props mmuhsin, jplojohn, garrett-eclipse, desrosj.
Fixes #44833.
Built from https://develop.svn.wordpress.org/trunk@44777


git-svn-id: http://core.svn.wordpress.org/trunk@44609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 11:49:51 +00:00
Sergey Biryukov
acaa0422f1 Privacy: Change "Email Data" link text on "Export Personal Data" screen to "Send Export Link" for clarity.
Previously: [43172], accidentally reverted in [43212].

Props birgire, ianbelanger.
Fixes #44822. See #43964.
Built from https://develop.svn.wordpress.org/trunk@44775


git-svn-id: http://core.svn.wordpress.org/trunk@44607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-28 11:37:51 +00:00
Gary Pendergast
3825e94d43 Upgrades: Update $_old_files for WordPress 5.1.
`wp-includes/random_compat/random_bytes_openssl.php` was removed in [43130], this commit updates `$_old_files` to match.

Fixes #46284.


Built from https://develop.svn.wordpress.org/trunk@44760


git-svn-id: http://core.svn.wordpress.org/trunk@44592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-21 04:35:50 +00:00
Andrea Fercia
6fe48278ea Accessibility: Comments: Improve links and buttons semantics and interaction.
With the exception of the "Edit" link, the "row actions" controls in the Comments table behave differently depending if JavaScript support is on or off.
When JavaScript support is off, they behave like links. When JavaScript support is on, they behave like buttons and they need to be buttons or have an ARIA `role="button"` added via JavaScript.

Lastly, the buttons in the Reply/Quick Edit form and the "Add Comment" in the edit post page meta box need to be buttons.

Fixes #43412.

Built from https://develop.svn.wordpress.org/trunk@44759


git-svn-id: http://core.svn.wordpress.org/trunk@44591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 23:37:50 +00:00
Andrea Fercia
2cbb1bd95e Accessibility: General Settings: Update custom date/time format previews while typing.
The custom date/time format previews in General Settings were updated only when blurring the related input fields. With this change, they're now updated when users finish typing a custom format, properly debouncing the `input` event callback.

Props dilipbheda, Girishpanchal.
Fixes #43364.

Built from https://develop.svn.wordpress.org/trunk@44758


git-svn-id: http://core.svn.wordpress.org/trunk@44590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 22:56:50 +00:00
Andrea Fercia
7f977760a1 Accessibility: Improve buttons placement in the Comments Quick edit/Reply form.
Proximity of related information is an inclusive design principle that benefits everyone and it's particularly important for users with reduced visual field, low vision, or other vision or cognitive impairments. User interface controls that are logically grouped should be placed close to each other.
Also, this change makes the buttons visual order and the DOM order match.

Fixes #45972.

Built from https://develop.svn.wordpress.org/trunk@44757


git-svn-id: http://core.svn.wordpress.org/trunk@44589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 22:09:50 +00:00
Peter Wilson
729c8e875f Admin: Improve logic of PHP version check on about page.
Props noisysocks, peterwilsoncc.
See #46161.


Built from https://develop.svn.wordpress.org/trunk@44735


git-svn-id: http://core.svn.wordpress.org/trunk@44567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 01:53:51 +00:00
Peter Wilson
c4505be534 Install/upgrade: Remove Gutenberg plugin deactivation from upgrade process.
The Gutenberg plugin will not be deactivated on sites upgrading to WordPress 5.1. This deprecates the `upgrade_500_was_gutenberg_active` option and the `upgrade_500()` function as they are no longer required.

Props peterwilsoncc.
Fixes #46029.


Built from https://develop.svn.wordpress.org/trunk@44732


git-svn-id: http://core.svn.wordpress.org/trunk@44563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 00:16:50 +00:00
Felix Arntz
92c3c46abe Bootstrap/Load: Revert fatal error recovery mechanism from 5.1 to polish for 5.2.
Due to the high number of follow-up tickets and associated security concerns, it was decided to reschedule the fatal error recovery feature for WordPress 5.2, in order to address these issues properly. The feature will continue to be developed, with iterations being merged into trunk early in the 5.2 release cycle.

Fixes #46141. See #44458, #45932, #45940, #46038, #46047, #46068.

Built from https://develop.svn.wordpress.org/trunk@44717


git-svn-id: http://core.svn.wordpress.org/trunk@44548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-30 11:01:52 +00:00
Dominik Schilling
9531bd8378 Privacy: Use label_count property of post status for request counts in the list table views.
See #44952.
Fixes #46112.
Built from https://develop.svn.wordpress.org/trunk@44708


git-svn-id: http://core.svn.wordpress.org/trunk@44539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 21:55:51 +00:00
Gary Pendergast
af73067eb5 Menus: Fix a deprecated call to get_terms().
The taxonomy should be passed as part of `$args`, rather than as its own argument.

Props birgire.
Fixes #45297.


Built from https://develop.svn.wordpress.org/trunk@44686


git-svn-id: http://core.svn.wordpress.org/trunk@44517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 23:38:52 +00:00
Gary Pendergast
64877e74e8 Comments: Default the show_comments_cookies_opt_in checkbox to enabled.
This also updates the option label, to clarify that it needs to be enabled for comment cookies to work.

Props azaozz, pento, dhavalkasvala, desrosj, pputzer, mirkoschubert, ThemeZee.
Fixes #44736.


Built from https://develop.svn.wordpress.org/trunk@44683


git-svn-id: http://core.svn.wordpress.org/trunk@44514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:57:52 +00:00
Dominik Schilling
7d9f962521 I18N: Enable clear_destination in upgrader for updating/installing language packs.
Introduces `Language_Pack_Upgrader::clear_destination()` to clear existing translations before installing new translations. Ensures that unused translations in JSON format are cleaned up.

Props dd32, swissspidy, ocean90.
Fixes #45468.
Built from https://develop.svn.wordpress.org/trunk@44676


git-svn-id: http://core.svn.wordpress.org/trunk@44507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 21:13:48 +00:00
Dominik Schilling
1c0849c2b2 I18N: Remove JSON translations when deleting a theme or a plugin.
See #29860.
Fixes #45467.
Built from https://develop.svn.wordpress.org/trunk@44675


git-svn-id: http://core.svn.wordpress.org/trunk@44506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 20:41:50 +00:00
Felix Arntz
7daa39eb1d Bootstrap/Load: Change shutdown handler naming to final fatal error handler and allow disabling the handler entirely via a constant.
The `WP_Shutdown_Handler` name plus related function names were premature when originally committed, as there can be multiple shutdown handlers in PHP, and WordPress makes use of that feature. This changeset modifies the name to a more appropriate `WP_Fatal_Error_Handler`, and related to that changes the following names:

* The drop-in to override the handler is now called `fatal-error-handler.php`.
* The internal function `wp_register_premature_shutdown_handler` is now called `wp_register_fatal_error_handler()`.

In addition to these naming changes, a new constant `WP_DISABLE_FATAL_ERROR_HANDLER` is introduced that can be set in `wp-config.php` to entirely disable the fatal error handler. That constant's value is and should be accessed indirectly via a new `wp_is_fatal_error_handler_enabled()` function and is filterable via a new `wp_fatal_error_handler_enabled` hook. Note that disabling the fatal error handler will skip the new functionality entirely, including the potentially used `fatal-error-handler.php` drop-in.

The new set of constant, filter and function provide for an easier-to-use mechanism to disable the fatal error handler altogether, rather than requiring developers to implement a drop-in for purely that purpose.

Props afragen, flixos90, joyously, knutsp, markjaquith, ocean90, schlessera, spacedmonkey.
Fixes #46047. See #44458.

Built from https://develop.svn.wordpress.org/trunk@44674


git-svn-id: http://core.svn.wordpress.org/trunk@44505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 20:15:50 +00:00
Sergey Biryukov
e992ae3ea2 Post Formats: Prevent Bulk Edit from unintentionally changing post format to Standard even if set to "No change".
Correct the logic in [41187].

Props birgire, mukesh27, lanche86.
Fixes #44914. See #41396.
Built from https://develop.svn.wordpress.org/trunk@44670


git-svn-id: http://core.svn.wordpress.org/trunk@44501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 18:05:50 +00:00
desrosj
eaa03c3c8c Privacy: Include request counts inline with the filters in the list table views.
Fixes $44952
Props eArtboard, pratikkry, birgire, garrett-eclipse.
Built from https://develop.svn.wordpress.org/trunk@44668


git-svn-id: http://core.svn.wordpress.org/trunk@44499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 17:35:51 +00:00
Sergey Biryukov
f93ccded3f Docs: Correct type and description for the first parameter of set-screen-option filter.
Props pbiron, burhandodhy.
Fixes #44850.
Built from https://develop.svn.wordpress.org/trunk@44667


git-svn-id: http://core.svn.wordpress.org/trunk@44498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 16:08:51 +00:00
Felix Arntz
9f2d529a77 Upgrade/Install: Make version_compare() calls for plugin required version checks more robust.
Props afragen.
Fixes #46024. See #43986.

Built from https://develop.svn.wordpress.org/trunk@44656


git-svn-id: http://core.svn.wordpress.org/trunk@44487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-20 12:03:53 +00:00
Andrew Ozz
fc781d2f8a TinyMCE: fix $_old_files after [44651], remove wp-tinymce.js and add wp-tinymce.js.gz.
Props ocean90, garrett-eclipse.
Fixes #45645.
Built from https://develop.svn.wordpress.org/trunk@44654


git-svn-id: http://core.svn.wordpress.org/trunk@44485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 10:23:50 +00:00
Gary Pendergast
9fc53b8461 Block Editor: Restore the Custom Fields display option.
When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.

Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.

Props dd32, pento.
Fixes #46028.


Built from https://develop.svn.wordpress.org/trunk@44648


git-svn-id: http://core.svn.wordpress.org/trunk@44479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 05:26:49 +00:00
Gary Pendergast
ac79b4e716 Coding Standards: Remove some add_action()s that were commented out years ago.
Props Girishpanchal.
Fixes #44545.


Built from https://develop.svn.wordpress.org/trunk@44647


git-svn-id: http://core.svn.wordpress.org/trunk@44478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 04:04:49 +00:00
Gary Pendergast
6ef9017c96 Docs: Add missing periods to a grab-bag of docblocks.
Props Hitendra Chopda.
Fixes #45409.


Built from https://develop.svn.wordpress.org/trunk@44643


git-svn-id: http://core.svn.wordpress.org/trunk@44474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:03:50 +00:00
Gary Pendergast
dcdfd7f412 Docs: Fix the last handful of incorrect @since 5.0.0 docblock tags.
Props peterwilsoncc.
Fixes #45543.


Built from https://develop.svn.wordpress.org/trunk@44635


git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
Gary Pendergast
3f847f8b6c Media: media_handle_sideload() expectes wp_insert_attachment() to return a WP_Error.
For `wp_insert_attachment()` to do that, we need to be setting the `$wp_error` parameter to true.

Props subrataemfluence, jirihon.
Fixes #44303.


Built from https://develop.svn.wordpress.org/trunk@44634


git-svn-id: http://core.svn.wordpress.org/trunk@44465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:27:50 +00:00
Gary Pendergast
3fc76e352b Comments: Correct the "Mine" comment count when viewing comments for a particular post.
The count should only be comments made on that post by the current user, not all comments by them.

Props chetan200891, garrett-eclipse.
Fixes #46014.


Built from https://develop.svn.wordpress.org/trunk@44631


git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 02:45:49 +00:00
Gary Pendergast
b158c806d1 Coding Standards: Remove an assignment in a conditional from get_plugins().
Props subrataemfluence.
Fixes #44249.


Built from https://develop.svn.wordpress.org/trunk@44630


git-svn-id: http://core.svn.wordpress.org/trunk@44461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 00:49:48 +00:00
desrosj
67bec96f92 Privacy: Improve the ’Copy’ button verbiage to provide more clarity.
On the Privacy Policy Guide, there is currently a ‘Copy’ button below each section of suggested text. It is unclear what copy means without more context. It could be assumed, for instance, that the suggested text is copied to a new page.

This changes the button text to read `Copy this section to clipboard` to more clearly inform the user what is copied and how.

Props JoshuaWold, garrett-eclipse, birgire, vishaldodiya.
Fixes #44677.
Built from https://develop.svn.wordpress.org/trunk@44629


git-svn-id: http://core.svn.wordpress.org/trunk@44460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 22:45:50 +00:00
desrosj
3baecf04ee Privacy: Allow column sorting in the privacy request admin tables.
This allows users to sort the export and erase personal data request tables by “Requester” (`post_title`, or user email) and “Requested” (`post_date`, or when the request was created), which can be helpful when sites have many requests present.

Props birgire, ianbelanger, pbiron, desrosj.
Fixes #43405.
Built from https://develop.svn.wordpress.org/trunk@44628


git-svn-id: http://core.svn.wordpress.org/trunk@44459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:52:49 +00:00
Felix Arntz
94fb16f03f Plugins: Use centralized API to display information about updating PHP when a plugin requires a higher version.
This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new `wp_update_php_annotation()` function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.

Furthermore, this changeset adds missing `update_php` capability checks before displaying the information about updating PHP.

Props afragen.
Fixes #45986. See #43986, #45686.

Built from https://develop.svn.wordpress.org/trunk@44627


git-svn-id: http://core.svn.wordpress.org/trunk@44458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:07:00 +00:00