Commit Graph

17 Commits

Author SHA1 Message Date
Sergey Biryukov
5850f5f6ef Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-site-health-auto-updates.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47841


git-svn-id: http://core.svn.wordpress.org/trunk@47617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-22 17:56:08 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
47ed56f38f Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
b95b6f2c73 Site Health: Move "The folder ... was detected as being under version control" message from failure to warning.
Props afragen, davidbaumwald.
Fixes #47982.
Built from https://develop.svn.wordpress.org/trunk@46281


git-svn-id: http://core.svn.wordpress.org/trunk@46093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 21:24:56 +00:00
Sergey Biryukov
c117b9957f Site Health: Use WP_Automatic_Updater::is_disabled() to check whether automatic updates are disabled.
The previous check for `DISALLOW_FILE_MODS` and `AUTOMATIC_UPDATER_DISABLED` constants didn't always provide accurate results.

Props Clorith, kraftner, afragen.
Fixes #47869.
Built from https://develop.svn.wordpress.org/trunk@46276


git-svn-id: http://core.svn.wordpress.org/trunk@46088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 20:52:56 +00:00
Dominik Schilling
123b4475b0 Site Health: Don't verify SSL certificate when testing the local site.
The SSL certificate may be self-signed which prevents various tests from returning proper results. Since the Cron API and file editors don't verify the certificate the tests shouldn't either.

Props Clorith, ocean90.
Fixes #47957.
Built from https://develop.svn.wordpress.org/trunk@46231


git-svn-id: http://core.svn.wordpress.org/trunk@46043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-21 16:06:57 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
desrosj
bb3c264350 Administration: Add missing filter documentation for Site Health auto update tests.
Props johnbillion, mukesh27.
Fixes #47388.
Built from https://develop.svn.wordpress.org/trunk@45459


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