Commit Graph

39795 Commits

Author SHA1 Message Date
Andrew Ozz
288116c9ff 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45239 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 00:33:03 +00:00
Sergey Biryukov
6621b2ec0e Bootstrap/Load: Only send the recovery mode email if the error occurs on a protected endpoint.
This reduces the potential email noise to places where the fatal error could be interfering with the login and admin experience.

Once the user is in recovery mode, any fatal errors (even if they aren't in a protected endpoint) are handled and the plugin or theme will be paused.

Props TimothyBlynJacobs.
See #46950.

git-svn-id: https://develop.svn.wordpress.org/trunk@45238 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 23:03:03 +00:00
Andrew Ozz
01719cb6b6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45237 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 21:25:05 +00:00
Jeremy Felt
adf7b8190d Docs: Add arguments passed by wp_insert_site() to wp_initialize_site().
Props codemascot.
Fixes #45061.


git-svn-id: https://develop.svn.wordpress.org/trunk@45236 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 20:56:18 +00:00
Sergey Biryukov
774dceac30 Users: In wp_list_authors(), check for author's post count before getting author's metadata.
This significantly reduces the number of SQL queries when `wp_list_authors()` is called on a site where the majority of users don't have any posts, e.g. a membership site.

Props billerickson, ianbelanger, dswebsme.
Fixes #45105.

git-svn-id: https://develop.svn.wordpress.org/trunk@45235 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 14:49:49 +00:00
Sergey Biryukov
60fd53ef96 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45234 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 14:34:12 +00:00
Sergey Biryukov
4206fe3e05 Docs: Remove @global tag for $wpdb from wp-admin/install.php and wp-admin/upgrade.php.
Per the documentation standards, the `@global` tag is meant to list PHP globals used within functions or methods.

The code in question uses the variable in global namespace, but does not explicitly declare it.

Props jayupadhyay01, dswebsme.
Fixes #46602.

git-svn-id: https://develop.svn.wordpress.org/trunk@45233 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 14:06:55 +00:00
Sergey Biryukov
da32612242 Docs: Correct spelling in various comments and DocBlocks, per the conventions in Core Contributor Handbook.
Props man4toman, samanehmirrajabi.
Fixes #45857.

git-svn-id: https://develop.svn.wordpress.org/trunk@45232 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 13:26:00 +00:00
Sergey Biryukov
7d6c912f16 Themes: Standardize on passing frontpage and privacypolicy as the $type parameter to get_query_template().
These keys are used in `{$type}_template_hierarchy` and `{$type}_template` filters.

Previously, `front_page` and `privacy_policy` were passed, but `get_query_template()` stripped the underscores before passing the values to the filters.

Props rinatkhaziev, tmatsuur, johnbillion.
Fixes #21213, #46958.

git-svn-id: https://develop.svn.wordpress.org/trunk@45231 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 12:57:01 +00:00
Sergey Biryukov
691258f1f4 Site Health: Group WP_DEBUG-related constants together.
Props tmatsuur.
Fixes #46955.

git-svn-id: https://develop.svn.wordpress.org/trunk@45230 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 11:59:13 +00:00
Andrea Fercia
e1022a6184 Site Health: Improve the accordions styles for small screens.
Also, changes the hex color values to lowercase.

Props subrataemfluence, man4toman, garrett-eclipse, chetan200891, mukesh27, melchoyce, karmatosed, Clorith.
Fixes #46949.


git-svn-id: https://develop.svn.wordpress.org/trunk@45229 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 10:59:12 +00:00
Andrea Fercia
2bf547ff53 Site Health: Remove title attribute from the directory sizes spinner.
Amends [45176].
See #46707.


git-svn-id: https://develop.svn.wordpress.org/trunk@45228 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 10:08:06 +00:00
Andrea Fercia
715a65c561 Accessibility: Make the Tags meta box better support Input Method Editor (IME) converters.
Also, restores the keyboard interaction behavior prior to [41988] by requesting one single Enter key press to add a tag.

Props ryanshoover, miyauchi.
Fixes #45371.


git-svn-id: https://develop.svn.wordpress.org/trunk@45227 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 07:17:26 +00:00
Sergey Biryukov
0152c18cd2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45226 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 04:12:27 +00:00
Jonathan Desrosiers
ad64c754c3 Administration: Add missing :before to two Dashicon class definitions.
Introduced in [45040].

Props builtbynorthby.
Fixes #41074.

git-svn-id: https://develop.svn.wordpress.org/trunk@45225 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 02:08:51 +00:00
Jonathan Desrosiers
d575d70fe9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45224 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 01:55:21 +00:00
Sergey Biryukov
dfeea03a58 Site Health: Remove reference to an undefined variable in WP_Site_Health_Auto_Updates::test_constants().
Props diddledan.
Fixes #46952.

git-svn-id: https://develop.svn.wordpress.org/trunk@45223 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 01:09:30 +00:00
Sergey Biryukov
260ee7308d Docs: Fix typo in WP_Site_Health_Auto_Updates::test_constants() description.
See #46543.

git-svn-id: https://develop.svn.wordpress.org/trunk@45222 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 00:59:54 +00:00
Sergey Biryukov
3feb1f171a PHPCS: Fix WPCS violations in [45220].
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45221 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 00:44:12 +00:00
Andrew Ozz
e85b26d14c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45220 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 23:01:45 +00:00
Adam Silverstein
70f16b6bf4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45219 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 20:29:42 +00:00
Jonathan Desrosiers
4f3f0fae08 Bundled Themes: Reverts [45213].
Reverting to address backward compatibility concerns in Twenty Eleven and Twenty Ten.

See #39997.

git-svn-id: https://develop.svn.wordpress.org/trunk@45218 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 18:21:24 +00:00
Andrea Fercia
f969e1dfd7 Administration: Improve the Site Health "Passed tests" button style for small screens.
Props chetan200891.
Fixes #46939.


git-svn-id: https://develop.svn.wordpress.org/trunk@45217 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 16:22:41 +00:00
Sergey Biryukov
c295378ecd Export: Remove extra whitespace from <title>, <content:encoded>, and <excerpt:encoded> elements in WXR files.
Props sgastard, juliarrr, aristath, SergeyBiryukov.
Fixes #46575.

git-svn-id: https://develop.svn.wordpress.org/trunk@45216 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 15:56:48 +00:00
Sergey Biryukov
9fa1b6f332 Feeds: Amend [45208] to avoid phpcs:ignore.
See #46922.

git-svn-id: https://develop.svn.wordpress.org/trunk@45215 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 15:45:07 +00:00
Sergey Biryukov
65837fb178 Permalinks: Avoid a PHP notice in wp_resolve_numeric_slug_conflicts() when visiting a day archive with the /%postname%/ permalink structure.
Props thakkarhardik, thomstark.
Fixes #46828.

git-svn-id: https://develop.svn.wordpress.org/trunk@45214 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 15:33:38 +00:00
Jonathan Desrosiers
1954fa7385 Bundled Themes: Use the theme version when enqueuing theme specific stylesheets.
For many bundled theme related stylesheets, a version is either not specified, or specified as a hardcoded date string when enqueued. This is problematic when a stylesheet is updated and the version number is not (which has happened several times recently). This change ensures that all bundled theme related stylesheets use the theme’s version as the stylesheet version. This ensures cache busting for theme stylesheets every time a theme is updated and guarantees that users receive any new or updated styles included in the update when visiting the site for the first time after an update.

Props parsmizban, ianbelanger, dswebsme.
Fixes #39997.

git-svn-id: https://develop.svn.wordpress.org/trunk@45213 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 14:55:48 +00:00
Jonathan Desrosiers
855232ec60 Twenty Thirteen: Correct Genericons stylesheet version number.
In [28693], the Genericons stylesheet was updated to `3.0.3`, but the version was incorrectly indicated as `3.03`.

See #39997.

git-svn-id: https://develop.svn.wordpress.org/trunk@45212 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 14:06:33 +00:00
Felix Arntz
aa377f582d Bootstrap/Load: Allow more than one recovery link to be valid at a time.
While currently a recovery link is only made available via the admin email address, this will be expanded in the future. In order to accomplish that, the mechanisms to store and validate recovery keys must support multiple keys to be valid at the same time.

This changeset adds that support, adding an additional token parameter which is part of a recovery link in addition to the key. A key itself is always associated with a token, so the two are only valid in combination. These associations are stored in a new `recovery_keys` option, which is regularly cleared in a new Cron hook, to prevent potential cluttering from unused recovery keys.

This changeset does not have any user-facing implications otherwise.

Props pbearne, timothyblynjacobs.
Fixes #46595. See #46130.


git-svn-id: https://develop.svn.wordpress.org/trunk@45211 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 05:08:16 +00:00
Felix Arntz
2f8a683fdc General: Display fatal error handler notice in admin backend even if headers have been sent.
This ensures that at least for the admin, which is more predictable than the frontend, the user-friendlier error notice from the fatal error handler still shows if a runtime fatal error happens within the page generation process.

Props axaak.
Fixes #46811.


git-svn-id: https://develop.svn.wordpress.org/trunk@45210 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 04:37:46 +00:00
Sergey Biryukov
5895974f10 Bundled Themes: Use consistent HTML comments after closing HTML tags.
Props iamdmitrymayorov.
Fixes #46871.

git-svn-id: https://develop.svn.wordpress.org/trunk@45209 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 01:29:20 +00:00
Sergey Biryukov
f83829ca4e Feeds: Remove whitespace from <updated> elements in Atom feeds.
Per Atom format's RFC, there must not be any whitespace in a Date construct or in any IRI.

Props josephwa.
Fixes #46922.

git-svn-id: https://develop.svn.wordpress.org/trunk@45208 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 00:45:05 +00:00
Sergey Biryukov
b66077a1aa I18N: Fix typo in a translator comment.
See #46920.

git-svn-id: https://develop.svn.wordpress.org/trunk@45207 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 23:55:52 +00:00
Sergey Biryukov
80817d3209 Bootstrap/Load: After [45016], make sure wp_die() does not cause _doing_it_wrong() notices if called before $wp_query global is set.
Props tmdesigned, TimothyBlynJacobs.
Fixes #46813.

git-svn-id: https://develop.svn.wordpress.org/trunk@45206 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 23:48:11 +00:00
Sergey Biryukov
d979017b64 Bootstrap/Load: Remove WP_Recovery_Mode_Cookie_Service constructor to avoid referencing cookie constants before they are defined.
Instantiating `WP_Recovery_Mode` should no longer have any required timing.

Props TimothyBlynJacobs, lkraav.
Fixes #46882.

git-svn-id: https://develop.svn.wordpress.org/trunk@45205 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 22:43:57 +00:00
John Blackbourn
8b1ecf68d9 I18N: Improvements to and additions of translator comments for various email subject strings.
Props ramiy

Fixes #46920


git-svn-id: https://develop.svn.wordpress.org/trunk@45204 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 22:38:59 +00:00
Sergey Biryukov
3d9f8c4d96 Docs: Adjust comments in wp_initial_constants() to conform to WPCS.
See #46543.

git-svn-id: https://develop.svn.wordpress.org/trunk@45203 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 22:09:31 +00:00
Mel Choyce
1442389a75 Administration: Update chevron color in Site Health.
Props afercia.
Fixes #46934. See #46730.


git-svn-id: https://develop.svn.wordpress.org/trunk@45202 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 18:55:34 +00:00
Andrea Fercia
94af7683fe Administration: Add a chevron icon to the Site Health "Passed tests" button.
The chevron icon helps clarify what the button does.

Props garrett-eclipse, Clorith, xkon, melchoyce.
Fixes #46730.


git-svn-id: https://develop.svn.wordpress.org/trunk@45201 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 18:00:57 +00:00
Andrea Fercia
3eb83ade1e Administration: Provide translatable strings for the Site Health comment status report.
Props ocean90.
Fixes #46909.


git-svn-id: https://develop.svn.wordpress.org/trunk@45200 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 15:07:36 +00:00
Andrea Fercia
9f8366994b Site Health: Add missing translator comments.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45199 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 14:38:26 +00:00
Andrea Fercia
92909607d6 Site health: Improve jQuery selectors so that they don't depend on a specific markup.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45198 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-14 14:29:03 +00:00
Andrea Fercia
5c9d27cd17 Coding standards: Site health: Avoid to use var in the middle of JavaScript function blocks.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45197 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-14 13:48:59 +00:00
Sergey Biryukov
d52d60c809 Site Health: Merge duplicate "utf8mb4 requires a newer client library" strings.
Props ramiy.
Fixes #46917.

git-svn-id: https://develop.svn.wordpress.org/trunk@45196 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:17:16 +00:00
Sergey Biryukov
7d54ac58cc Site Health: Merge duplicate "Error" strings.
Props ramiy.
Fixes #46915.

git-svn-id: https://develop.svn.wordpress.org/trunk@45195 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:11:46 +00:00
Sergey Biryukov
68ac2e4998 Users: Merge duplicate "Download failed" strings.
Props ramiy.
Fixes #46914.

git-svn-id: https://develop.svn.wordpress.org/trunk@45194 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:07:35 +00:00
Sergey Biryukov
35498b090e Site Health: Merge duplicate "Latest version" strings.
Props ramiy.
Fixes #46913.

git-svn-id: https://develop.svn.wordpress.org/trunk@45193 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:03:23 +00:00
Sergey Biryukov
b9b33979a0 Site Health: Merge duplicate "Learn more about updating PHP" strings.
Props ramiy.
Fixes #46912.

git-svn-id: https://develop.svn.wordpress.org/trunk@45192 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 17:58:12 +00:00
Dominik Schilling
c4d7d5e772 Docs: Add missing @since tag for [45031].
Props dimadin.
See #46667.

git-svn-id: https://develop.svn.wordpress.org/trunk@45191 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 14:16:57 +00:00
Sergey Biryukov
30caafae40 Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under ABSPATH.
Props dmsnell, birgire, szepe.viktor.
Fixes #46327.

git-svn-id: https://develop.svn.wordpress.org/trunk@45190 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 04:45:05 +00:00