Commit Graph

7170 Commits

Author SHA1 Message Date
Sergey Biryukov
a36f5d2295 Docs: Fix typos in DocBlocks and comments in wp-admin/includes/file.php.
Props mukesh27.
Fixes #47026.
Built from https://develop.svn.wordpress.org/trunk@45394


git-svn-id: http://core.svn.wordpress.org/trunk@45205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 01:08:51 +00:00
Sergey Biryukov
726e77d97e Networks and Sites: Readjust tabs in wp-admin/includes/network.php for (more or less) consistent alignment.
See #47062.
Built from https://develop.svn.wordpress.org/trunk@45391


git-svn-id: http://core.svn.wordpress.org/trunk@45202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-23 23:35:52 +00:00
Sergey Biryukov
139225ad7a Networks and Sites: Remove extra whitespace in .htaccess rules on Network Setup page.
Props riddhiehta02 for initial patch, sebastienserre, masterforwordpress.
Fixes #47062.
Built from https://develop.svn.wordpress.org/trunk@45390


git-svn-id: http://core.svn.wordpress.org/trunk@45201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-23 23:28:53 +00:00
Sergey Biryukov
3b926e0b47 Upgrade/Install: As a follow-up to [45357], when linking to Update PHP support page in error messages, check if wp_get_update_php_url() and wp_get_update_php_annotation() exist.
`wp-admin/includes/update-core.php` runs in the context of the previous WordPress version. Any calls to newly introduced functions there need to be checked via `function_exists()`.

Reviewed by desrosj, earnjam, SergeyBiryukov.

Props dd32, imath.
Fixes #47323.
Built from https://develop.svn.wordpress.org/trunk@45365


git-svn-id: http://core.svn.wordpress.org/trunk@45176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-20 14:29:55 +00:00
Sergey Biryukov
f72cb6dc83 Upgrade/Install: Improve error messages displayed when WordPress update fails due to an incompatible PHP version by linking to the Update PHP support page.
Additionally, fix a regression in [44451] where the error message in `wp-admin/upgrade.php` was prepared, but never displayed.

Props afragen, netweb, hareesh-pillai, SergeyBiryukov.
Fixes #46937.
Built from https://develop.svn.wordpress.org/trunk@45357


git-svn-id: http://core.svn.wordpress.org/trunk@45168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 18:11:51 +00:00
Sergey Biryukov
e68fe165ae Site Health: In PHP modules test description, move the space before the screen reader text out from the translatable string.
Props ocean90, tobifjellner.
Fixes #47161.
Built from https://develop.svn.wordpress.org/trunk@45346


git-svn-id: http://core.svn.wordpress.org/trunk@45157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 11:50:58 +00:00
tellyworth
1d730f20e5 Upgrade/Install: Don't run signature verify on slow 32-bit systems.
The sodium_compat library can be very slow for certain operations on 32-bit architectures, which can lead to web server timeouts while attempting to verify an update. This adds a runtime speed check to skip signature verification on systems that would otherwise time out. Includes simple unit tests.

Props dd32, paragoninitiativeenterprises.
See #47186.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 11:06:53 +00:00
Sergey Biryukov
cbad1109f4 Site Health: Use correct singular string for plugin and theme version tests.
Props edocev, Presskopp.
Fixes #47264.
Built from https://develop.svn.wordpress.org/trunk@45336


git-svn-id: http://core.svn.wordpress.org/trunk@45147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 01:00:54 +00:00
Sergey Biryukov
4236a3522d I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158].
Use an established pattern of moving additional link attributes out of the translatable string.

Props dimadin.
Fixes #47159.
Built from https://develop.svn.wordpress.org/trunk@45334


git-svn-id: http://core.svn.wordpress.org/trunk@45145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 00:53:54 +00:00
Sergey Biryukov
a9fc042377 Site Health: In PHP modules test, ensure the description is translated as a whole sentence, not as separate string parts.
Props dimadin, SergeyBiryukov.
Fixes #47161.
Built from https://develop.svn.wordpress.org/trunk@45331


git-svn-id: http://core.svn.wordpress.org/trunk@45142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 00:07:54 +00:00
Sergey Biryukov
9c1a666249 Site Health: In HTTP requests test, when checking whether the WP_HTTP_BLOCK_EXTERNAL constant is defined, check its value as well.
Props chesio.
Fixes #47297.
Built from https://develop.svn.wordpress.org/trunk@45328


git-svn-id: http://core.svn.wordpress.org/trunk@45139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-16 22:08:54 +00:00
desrosj
f48f926077 Site Health: Improve vertical alignment of icons in test result descriptions.
This change removes redundant CSS properties for different health check statuses in favor of utilizing the `.dashicons` class already in Core to define them more consistently. This also fixes the vertical alignment issues.

Props chetan200891, Clorith, desrosj.
Fixes #46940.
Built from https://develop.svn.wordpress.org/trunk@45309


git-svn-id: http://core.svn.wordpress.org/trunk@45120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-15 14:26:07 +00:00
desrosj
7d04482650 Site Health: Link to the correct plugin update screen in multisite installs.
Props Clorith, sebastienserre, jeremyfelt, desrosj.
Fixes #47189.
Built from https://develop.svn.wordpress.org/trunk@45308


git-svn-id: http://core.svn.wordpress.org/trunk@45119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-15 14:13:05 +00:00
Andrea Fercia
9cc696fbce Accessibility: Add aria-current to the links in the <nav> elements introduced in [44905].
Also fixes a few translators comments and coding standards.

Props audrasjb.
Fixes #47106.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-09 20:58:54 +00:00
desrosj
d0f46bf73c I18N: Combine similar strings with minor differences.
Props dimadin.
Fixes #47158.
Built from https://develop.svn.wordpress.org/trunk@45298


git-svn-id: http://core.svn.wordpress.org/trunk@45107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-09 19:48:53 +00:00
desrosj
6ac1d4ec1a Site Health: Disable recommendations that could be problematic on multisite installs.
When viewing Site Health for a multisite install, there are a few recommendations that are not appropriate and could have negative implications for other sites on the install if the administrator follows the advice provided.

For example, Site Health recommends that inactive plugins and themes for a site should be removed. On a single site install, this is a great recommendation. However, on a multisite install, inactive plugins and themes for one site should not be removed because they could be active for other sites on the network.

This change also disables the `test_wp_version_check_attached()` test for multisite. This test checks for the presence of the `wp_version_check()` function on the `wp_version_check` hook, which is not present for every site on multisite.

Reviewed by jeremyfelt and desrosj.

Props iandunn, Clorith, azaozz, jeremyfelt.
Fixes #47084.
Built from https://develop.svn.wordpress.org/trunk@45275


git-svn-id: http://core.svn.wordpress.org/trunk@45084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-01 18:08:53 +00:00
Sergey Biryukov
8b333f8c20 Docs: Use 3-digit, x.x.x style semantic versioning for @since 5.2.0 entries in wp-admin/includes/file.php.
See #46543.
Built from https://develop.svn.wordpress.org/trunk@45266


git-svn-id: http://core.svn.wordpress.org/trunk@45075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-24 23:36:51 +00:00
tellyworth
ed802428e3 Upgrade/install: fix verification bugs and scale back signature checks.
This fixes several bugs in the signature verification code:
Disables signature checks on certain incompatible PHP versions that cause math errors when opcache is enabled;
Prevents a spurious URL and subsequent error when downloading a zip file with query arguments;
Prevents errors triggered by third-party upgrade scripts as per #46615;
Disables signature tests for Plugins, Themes, and Translations, leaving only core updates.

At the 5.2 release the API servers will only provide signatures for core update packages, which is why messages are suppressed for plugins and other package types. Signatures for those other items will become available later.

Props dd32.
See #39309, #46615


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


git-svn-id: http://core.svn.wordpress.org/trunk@45071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-24 07:44:51 +00:00
Andrew Ozz
0da8c2265f Site Health: Fix count of inactive themes and the recommendation to remove them when the default theme is active or is a parent of the active child theme.
Props sudhiryadav, ianbelanger, mukesh27, azaozz.
Fixes #46900.
Built from https://develop.svn.wordpress.org/trunk@45260


git-svn-id: http://core.svn.wordpress.org/trunk@45069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-23 21:37:53 +00:00
Andrew Ozz
2548263bac Site Health: Allow some HTML (inline tags only) in the section descriptions. Add some more docs about expected formatting of the gathered data.
Props kraftbj, jeherve, mukesh27, audrasjb, azaozz.
Fixes #46878.
Built from https://develop.svn.wordpress.org/trunk@45259


git-svn-id: http://core.svn.wordpress.org/trunk@45068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-23 21:05:52 +00:00
Sergey Biryukov
bd9421104a Networks and Sites: Use correct escaping function for classes added via ms_user_list_site_class filter.
Props david.binda.
Fixes #46990. See #41146.
Built from https://develop.svn.wordpress.org/trunk@45252


git-svn-id: http://core.svn.wordpress.org/trunk@45061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-19 13:51:51 +00:00
Dominik Schilling
2d58638ba0 Site Health: Fix debug data with nested fields for copying.
* Use `$debug_data` instead of `$field['value']` to retrieve the debug data.
* Rename inner variables to avoid overriding the output variable.

Props Clorith, ocean90.
See #46573.
Built from https://develop.svn.wordpress.org/trunk@45246


git-svn-id: http://core.svn.wordpress.org/trunk@45055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 16:26:51 +00:00
Andrew Ozz
9659676fca Site Health info tab: Remove the "Directories and Sizes" section on Multisite installations. Most of the info shown there doesn't apply for multisite.
Props xkon, desrosj, azaozz.
Built from https://develop.svn.wordpress.org/trunk@45239


git-svn-id: http://core.svn.wordpress.org/trunk@45048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 00:34:51 +00:00
Andrew Ozz
2a5c2a2cce Site health info tab: replace "Not calculated" with "Loading..." in the "Directories and Sizes" section (that's an existing string and wouldn't cause problems for translators).
See #46707.
Built from https://develop.svn.wordpress.org/trunk@45237


git-svn-id: http://core.svn.wordpress.org/trunk@45046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 21:26:52 +00:00
Sergey Biryukov
23de32062e Site Health: Allow any callable added via site_status_tests filter to return test results for direct tests.
Async tests still need to be a string for the AJAX action.

Props kraftbj.
Fixes #46836.
Built from https://develop.svn.wordpress.org/trunk@45234


git-svn-id: http://core.svn.wordpress.org/trunk@45043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 14:35:50 +00:00
Sergey Biryukov
d2ccaacedf Docs: Correct spelling in various comments and DocBlocks, per the conventions in Core Contributor Handbook.
Props man4toman, samanehmirrajabi.
Fixes #45857.
Built from https://develop.svn.wordpress.org/trunk@45232


git-svn-id: http://core.svn.wordpress.org/trunk@45041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 13:26:51 +00:00
Sergey Biryukov
604769cca5 Site Health: Group WP_DEBUG-related constants together.
Props tmatsuur.
Fixes #46955.
Built from https://develop.svn.wordpress.org/trunk@45230


git-svn-id: http://core.svn.wordpress.org/trunk@45039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 12:00:54 +00:00
Sergey Biryukov
74e9c3d20d Docs: Improve documentation for various WP_Filesystem_Base methods and extending classes.
Props jaydeep-rami, man4toman, SaeedFard, mukesh27, mohadeseghasemi, ebrahimzadeh, juiiee8487, SergeyBiryukov.
Fixes #42227, #46806, #46840. See #46543.
Built from https://develop.svn.wordpress.org/trunk@45226


git-svn-id: http://core.svn.wordpress.org/trunk@45035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 04:13:51 +00:00
desrosj
f807a098b1 Administration: Improve the accuracy of is_block_editor().
Currently, there are a number of scenarios where `is_block_editor()` (and `WP_Screen::is_block_editor`) would incorrectly indicate block editor support at different points of the loading process. Most notably, checking `is_block_editor` when hooking into the `current_screen` action will always result in `false`, even when the block editor is being loaded. This is because `is_block_editor` is not set to `true` until `edit-form-blocks.php` is included.

This change adds logic to `WP_Screen` to ensure the accuracy of `is_block_editor` on block editor pages earlier in the load process.

While edit screens will now be accurate 100% of the time from `current_screen` on, there are still a few edge cases where `is_block_editor` could contain an incorrect value when creating a new post.

Because a `WP_Post` object is a required parameter for the `replace_editor` filter and `use_block_editor_for_post()` function, `WP_Screen` will fall back to the value returned by `use_block_editor_for_post_type()` for the post being created. To eliminate these edge cases, the `use_block_editor_for_post_type` filter can be used to return the appropriate boolean value to indicate support.

Props Chouby, desrosj, aduth, johnbillion.
Fixes #46195.
Built from https://develop.svn.wordpress.org/trunk@45224


git-svn-id: http://core.svn.wordpress.org/trunk@45033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 01:56:52 +00:00
Sergey Biryukov
893be2cf11 Site Health: Remove reference to an undefined variable in WP_Site_Health_Auto_Updates::test_constants().
Props diddledan.
Fixes #46952.
Built from https://develop.svn.wordpress.org/trunk@45223


git-svn-id: http://core.svn.wordpress.org/trunk@45032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 01:10:52 +00:00
Sergey Biryukov
01dec9af0b Docs: Fix typo in WP_Site_Health_Auto_Updates::test_constants() description.
See #46543.
Built from https://develop.svn.wordpress.org/trunk@45222


git-svn-id: http://core.svn.wordpress.org/trunk@45031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 01:00:51 +00:00
Sergey Biryukov
6ad0bf33ec PHPCS: Fix WPCS violations in [45220].
See #46707.
Built from https://develop.svn.wordpress.org/trunk@45221


git-svn-id: http://core.svn.wordpress.org/trunk@45030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 00:45:50 +00:00
Andrew Ozz
9a316c6ea4 Site health, info tab:
- Change `recurse_dirsize()` to accept an array of excluded paths.
- Change so we don't calculate the sizes of dirs in wp-content twice.
- Add the size in bytes to the "debug" into.
- Add a custom DOM event after the dir sizes request is done. Can be used by plugins to "daisy chain" more requests.
- Move "WordPress directory location" and "WordPress directory size" to the top in the "Directories and Sizes" section.
- Move "Theme directory location" to the "Active Theme" section.
- Fix labels capitalization.

Props xkon, afercia, Clorith, azaozz.
Fixes #46707.
Built from https://develop.svn.wordpress.org/trunk@45220


git-svn-id: http://core.svn.wordpress.org/trunk@45029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-16 23:02:51 +00:00
Adam Silverstein
8e9315f51e Media: move get_available_post_mime_types to wp-includes/post.php making it more generally available.
Address an issue since r44947 where calling `wp_enqueue_media` on the front-end would result in a PHP fatal.

Props david.binda.
Fixes #46795.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-16 20:30:51 +00:00
Sergey Biryukov
c28e516c80 Export: Remove extra whitespace from <title>, <content:encoded>, and <excerpt:encoded> elements in WXR files.
Props sgastard, juliarrr, aristath, SergeyBiryukov.
Fixes #46575.
Built from https://develop.svn.wordpress.org/trunk@45216


git-svn-id: http://core.svn.wordpress.org/trunk@45025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-16 15:57:53 +00:00
Sergey Biryukov
6efa2cd724 I18N: Fix typo in a translator comment.
See #46920.
Built from https://develop.svn.wordpress.org/trunk@45207


git-svn-id: http://core.svn.wordpress.org/trunk@45016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-15 23:56:52 +00:00
John Blackbourn
d4d1267847 I18N: Improvements to and additions of translator comments for various email subject strings.
Props ramiy

Fixes #46920

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


git-svn-id: http://core.svn.wordpress.org/trunk@45013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-15 22:39:50 +00:00
Andrea Fercia
5ac2b28396 Administration: Provide translatable strings for the Site Health comment status report.
Props ocean90.
Fixes #46909.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-15 15:08:51 +00:00
Sergey Biryukov
394d3b2f9b Site Health: Merge duplicate "utf8mb4 requires a newer client library" strings.
Props ramiy.
Fixes #46917.
Built from https://develop.svn.wordpress.org/trunk@45196


git-svn-id: http://core.svn.wordpress.org/trunk@45005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 18:18:52 +00:00
Sergey Biryukov
f94f0684b1 Site Health: Merge duplicate "Error" strings.
Props ramiy.
Fixes #46915.
Built from https://develop.svn.wordpress.org/trunk@45195


git-svn-id: http://core.svn.wordpress.org/trunk@45004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 18:12:52 +00:00
Sergey Biryukov
38f3607c53 Users: Merge duplicate "Download failed" strings.
Props ramiy.
Fixes #46914.
Built from https://develop.svn.wordpress.org/trunk@45194


git-svn-id: http://core.svn.wordpress.org/trunk@45003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 18:08:52 +00:00
Sergey Biryukov
cbe1c88485 Site Health: Merge duplicate "Latest version" strings.
Props ramiy.
Fixes #46913.
Built from https://develop.svn.wordpress.org/trunk@45193


git-svn-id: http://core.svn.wordpress.org/trunk@45002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 18:04:52 +00:00
Sergey Biryukov
b6471e9be4 Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under ABSPATH.
Props dmsnell, birgire, szepe.viktor.
Fixes #46327.
Built from https://develop.svn.wordpress.org/trunk@45190


git-svn-id: http://core.svn.wordpress.org/trunk@44999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 04:46:52 +00:00
Sergey Biryukov
88fdfae793 Plugins: Introduce is_wp_version_compatible() and is_php_version_compatible() for checking compatibility with the current WordPress or PHP version.
Props afragen.
Fixes #46599.
Built from https://develop.svn.wordpress.org/trunk@45185


git-svn-id: http://core.svn.wordpress.org/trunk@44994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 23:56:52 +00:00
aduth
41022dc6f2 Privacy: Remove unnecessary translation from help notice action label.
As static markup, the Privacy Policy editor help notice link no longer needs to be translateable with the revisions included in [45174].

Props garrett-eclipse.
Fixes #46098. See [45174].

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


git-svn-id: http://core.svn.wordpress.org/trunk@44989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 20:44:52 +00:00
Sergey Biryukov
1ae11820fc Site Health: i18n audit, take 2.
* Use `wp.i18n` to translate JavaScript strings.
* Use `_n()` for proper plural forms support.

Props TimothyBlynJacobs, ocean90, afercia.
Fixes #46683.
Built from https://develop.svn.wordpress.org/trunk@45178


git-svn-id: http://core.svn.wordpress.org/trunk@44987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 20:34:51 +00:00
Andrew Ozz
30ccfd540f Site health: Load the "Info" tab immediately and notify the user while gathering site data. Changes the Info tab to work similarly to the Status tab: it does separate request to fetch the directories sizes and doesn't "block" the loading of the page.
Props xkon, afercia, Clorith, azaozz.
See #46707.
Built from https://develop.svn.wordpress.org/trunk@45176


git-svn-id: http://core.svn.wordpress.org/trunk@44985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 19:24:51 +00:00
aduth
7f456cab7d Privacy: Display help notice on block editor screen.
Use the Notices data module when viewing the block editor screen for the assigned Privacy Policy page to display a help notice.

Props garrett-eclipse, joen, xkon.
Fixes #46098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 18:19:51 +00:00
desrosj
44d977b2af Site Health: Correctly refer to an .htaccess file as hidden.
The preceding period (`.`) should always be included when referring to an `.htaccess` file.

Props: ianbelanger, garrett-eclipse, subrataemfluence, burhandodhy.
Fixes #46841.
Built from https://develop.svn.wordpress.org/trunk@45171


git-svn-id: http://core.svn.wordpress.org/trunk@44980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 17:50:52 +00:00
desrosj
6afe73667c Site Health: Add missing actions to tests.
This change adds missing actions for several tests. This ensures that the user is provided with a next step, whenever possible.

Also, change the URL displayed in the WordPress.org communication test description to `api.wordpress.org` for accuracy.

Props: garrett-eclipse, Clorith, vaishalipanchal.
Fixes #46734.
Built from https://develop.svn.wordpress.org/trunk@45170


git-svn-id: http://core.svn.wordpress.org/trunk@44979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 17:40:53 +00:00
desrosj
5bafb4ea2d Site Health: Improve the test badge implementation.
Label badges for each Site Health test currently display in either red, orange, or green, regardless of if the test passed or failed. This is confusing, as seeing red labels in the “Passed Test” section could alarm users (when really everything is OK and no action is required), and seeing green labels in the “Failed Tests” section would not appropriately encourage the user to take appropriate action.

This change makes several improvements to the label badges:

- Always right align the badges for consistent display.
- Remove background fill for badges. Instead, use a border.
- Use a consistent styling for all tests (passed and failed).
- The text color no longer uses true black (#000000).
- The `.badge.pink` CSS definition has been switched to `.badge.purple`, and the definitions for blue, gray, and green have also been updated to more closely follow the official WordPress color palette.

Props: pbiron, garrett-eclipse, hedgefield, Clorith, xkon, melchoyce, mdwolinski, alexdenning.
Fixes #46623.
Built from https://develop.svn.wordpress.org/trunk@45169


git-svn-id: http://core.svn.wordpress.org/trunk@44978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 17:04:52 +00:00
desrosj
e04ffc348b Administration: Remove unnecessary numbered placeholders.
Props: tobifjellner, thrijith.
Fixes #46824.
Built from https://develop.svn.wordpress.org/trunk@45167


git-svn-id: http://core.svn.wordpress.org/trunk@44976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 16:32:50 +00:00
desrosj
501234ebe0 Site Health: Include both site and user locales in debug information.
Previously, only the site’s locale was displayed in the Site Health debug information. Moving forward, both the site’s default locale and the user’s locale will be specified.

This change also removes the `@param` tag for `WP_Debug_Data::debug_data()`. This parameter was previously removed in [45156].

Props: mukesh27, ianbelanger, Clorith, desrosj.
Fixes #46803.
Built from https://develop.svn.wordpress.org/trunk@45166


git-svn-id: http://core.svn.wordpress.org/trunk@44975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 15:49:52 +00:00
desrosj
8d04086af3 Upgrade/Install: Prevent plugin auto updates if PHP version requirements are not satisfied.
In [44937] and [44939], changes were made to prevent a user from updating any plugin that requires a higher version of PHP than the site is running. This compliments those changes to also prevent plugins from being auto updated when the same requirements are not met.

Props: TimothyBlynJacobs, davidbaumwald.
Fixes #46613.
Built from https://develop.svn.wordpress.org/trunk@45165


git-svn-id: http://core.svn.wordpress.org/trunk@44974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 14:02:53 +00:00
Mike Schroder
8b0cc1c90f Site Health: Clarify WP_DEBUG warning and translation contexts.
Clarifies that `WP_DEBUG` can cause `WP_DEBUG_DISPLAY` to be enabled,
and uses the constants themselves in related translation contexts.

Props mukesh27, ocean90, clorith, SergeyBiryukov, mikeschroder.
Fixes #46877.
Built from https://develop.svn.wordpress.org/trunk@45164


git-svn-id: http://core.svn.wordpress.org/trunk@44973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 02:27:51 +00:00
Andrea Fercia
2887cea50f Accessibility: Improve the image "Alternative Text" field in the Edit Media screen.
Brings parity with the changes for the Media Views introduced in [44900].
- moves the alt text field to the top as first field
- adds an explanatory text with a link pointing to the W3C "alt decision tree" tutorial
- adds `aria-describedby` to target the explanatory text
- adjusts the CSS and indentation

Props chetan200891.
Fixes #46875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-10 20:00:50 +00:00
Andrew Ozz
8ffebab3e6 Site health: Fix gathering the site data twice on non-English locales. Introduces two sets of data:
- More verbose set used to generate the admin page.
- More concise set that is copied when clicking the "Copy the site info" button intended mostly for support and developers.

Props xkon, azaozz.
Fixes #46726.
Built from https://develop.svn.wordpress.org/trunk@45156


git-svn-id: http://core.svn.wordpress.org/trunk@44965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-10 05:07:51 +00:00
desrosj
dd0785d3f9 Privacy: Pass admin URLs for data export and erase forms through esc_url().
Introduced in [45149].

Props: birgire.
Fixes #44047.
Built from https://develop.svn.wordpress.org/trunk@45154


git-svn-id: http://core.svn.wordpress.org/trunk@44963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-09 14:07:51 +00:00
Gary Pendergast
d6c90ca7d7 Privacy: Add a missing <form> action on the Export/Erasure screens.
This lack of action could cause an expired nonce to end up in the URL.

Props garrett-eclipse, saimonh, xkon.
Fixes #44047.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-09 00:08:54 +00:00
Gary Pendergast
cbc0240cd6 Privacy: Only mark a personal data export as complete when the user downloads it.
An admin may download an export to check that it's all correct, but this action shouldn't mark the request as complete.

Props garrett-eclipse, JoshuaWold, birgire.
Fixes #44644.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-09 00:04:50 +00:00
Gary Pendergast
4b1ff1c298 Media: Update the media bulk action labels for consistency.
Props ianbelanger, garrett-eclipse, afercia, Presskopp.
Fixes #44675.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 23:54:52 +00:00
Gary Pendergast
9a80e2095b Text Changes: Tweak the wording of email notification subjects.
This change brings more coherence between the subject lines of the various emails WordPress will send.

Props ramiy, pento.
Fixes #37940.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 06:17:51 +00:00
Gary Pendergast
f6128eb7e6 Post Formats: Remove the post format icons from the post list table.
Props mukesh27, melchoyce, karmatosed, afercia, mapk.
Fixes #46591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 06:04:50 +00:00
Sergey Biryukov
5810543816 PHPCS: Fix WPCS violation in [45119].
See #46809.
Built from https://develop.svn.wordpress.org/trunk@45122


git-svn-id: http://core.svn.wordpress.org/trunk@44931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-06 16:02:52 +00:00
Sergey Biryukov
80e638ad0e Site Health: Update recommendation labels to highlight Performance instead of Security when using a supported and actively maintained version of WordPress, PHP, or MySQL.
Props Clorith, earnjam.
Fixes #46789.
Built from https://develop.svn.wordpress.org/trunk@45121


git-svn-id: http://core.svn.wordpress.org/trunk@44930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-06 16:00:51 +00:00
Sergey Biryukov
4d3fb9b22b Site Health: Restore backticks in "Copy to clipboard" functionality, accidentally removed in [45044].
The backticks ensure that the data is formatted accordingly on pasting whenever possible.

Props Clorith.
Fixes #46809.
Built from https://develop.svn.wordpress.org/trunk@45119


git-svn-id: http://core.svn.wordpress.org/trunk@44928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-06 15:36:51 +00:00
Sergey Biryukov
a431028795 Site Health: Display a correct error message for a failing request in wp_version_check() test.
Props Clorith, axaak.
Fixes #46814.
Built from https://develop.svn.wordpress.org/trunk@45118


git-svn-id: http://core.svn.wordpress.org/trunk@44927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-06 15:28:50 +00:00
Felix Arntz
5754da106b Administration: Improve user experience and clarify when in recovery mode.
This changeset introduces several changes around usability when recovery mode is active:

* Display a notice in the admin clarifying that the user is in recovery mode.
* Use a highlight color for the admin bar link to exit recovery mode.
* Exit recovery mode automatically when logging out.
* Include a recovery mode indicator in the title tag.

Props aandrewdixon, azaozz, dhanukanuwan, flixos90, henrywright, karmatosed, mapk, melchoyce, spacedmonkey, TimothyBlynJacobs, tinkerbelly.
See #46608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 17:00:52 +00:00
Felix Arntz
52354f3f0b Bootstrap/Load: Do not redefine constants because tests don't like it.
See #46045.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 15:53:50 +00:00
Felix Arntz
5d2c761568 Bootstrap/Load: Remove extension from the list of paused extensions when it is deactivated.
With this change, fatal errors recorded before a plugin was deactivated or a theme was switched away from do not persist. This ensures that re-enabling it re-checks for fatal errors correctly.

Props aandrewdixon, dhanukanuwan, henrywright.
Fixes #46812.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 15:33:52 +00:00
Felix Arntz
6d58109b09 Bootstrap/Load: Ensure WP_Fatal_Error_Handler does not conflict with existing mechanisms treating fatal errors.
Prior to this change, resuming or activating a plugin or theme that is still broken would result in a redirect loop if in recovery mode. If outside recovery mode, it would cause the error template to be displayed.

Furthermore this applies to breaking a plugin or theme when editing from the backend.

Props aandrewdixon, azaozz, dhanukanuwan, henrywright, ocean90, ohiosierra, PandelisZ, xkon.
Fixes #46045, #46751.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 15:20:55 +00:00
Pascal Birchler
ec05cd3168 Site Health: Remove unused $wp_config_path variable.
Discovered and fixed during WordCamp London 2019 contributor day.

Props m_uysl.
Fixes #46808.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 11:09:51 +00:00
tellyworth
23fe2800cc Upgrade/Install: Add more context in signature verify failures.
This includes version numbers and signature counts in error reports, to help diagnose isolated failures that have no apparent cause.

Props dd32.
See #39309.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 05:20:51 +00:00
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