Commit Graph

39632 Commits

Author SHA1 Message Date
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
Sergey Biryukov
5f93c86b84 CSS Coding Standards: Use unitless values for line-height in wp-admin/css/customize-controls.css.
Props ianbelanger, audrasjb, pbiron, afercia.
Fixes #46494. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45189 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 04:36:01 +00:00
Sergey Biryukov
4de00af6f8 CSS Coding Standards: Use unitless values for line-height in wp-admin/css/themes.css.
Props ianbelanger, mukesh27, audrasjb, pbiron, afercia.
Fixes #46518. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45188 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 04:31:08 +00:00
Sergey Biryukov
eb2f56da08 CSS Coding Standards: Use unitless values for line-height for count bubbles in wp-admin/css/admin-menu.css.
Missed in [45186].

Props ianbelanger.
See #46489, #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45187 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 04:19:52 +00:00
SergeyBiryukov
10112902ce CSS Coding Standards: Use unitless values for line-height in wp-admin/css/admin-menu.css.
Props ianbelanger, mukesh27, pbiron, afercia.
Fixes #46489. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45186 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 00:16:01 +00:00
Sergey Biryukov
78e868e4c7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45185 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 23:55:19 +00:00
Sergey Biryukov
e844945b31 Plugins: In list_plugin_updates(), only display the annotation and the surrounding tags if it's not empty.
Props afragen.
Fixes #46680.

git-svn-id: https://develop.svn.wordpress.org/trunk@45184 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 21:51:58 +00:00
Jonathan Desrosiers
a8e7d339ae Post WordPress 5.2 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@45183 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 21:26:49 +00:00
Jonathan Desrosiers
bb3c56a5bc WordPress 5.2 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@45182 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 21:05:09 +00:00
Sergey Biryukov
b7c8eb8bcb Bootstrap/Load: Finalize recovery mode email language.
Props TimothyBlynJacobs, miss_jwo, desrosj.
Fixes #46898.

git-svn-id: https://develop.svn.wordpress.org/trunk@45181 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:48:05 +00:00
Andrew Duthie
f627138361 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].


git-svn-id: https://develop.svn.wordpress.org/trunk@45180 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:43:40 +00:00
Sergey Biryukov
6627bc4967 Site Health: Use _n() for %s Items with no issues detected string, missed in [45178].
See #46683.

git-svn-id: https://develop.svn.wordpress.org/trunk@45179 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:39:05 +00:00
Sergey Biryukov
936db1b0e1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45178 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:33:48 +00:00
Joe McGill
5021d218ef Media: Fix deletion of files when using stream wrappers.
This fixes a bug introduced in [43392] which breaks file deletion on systems using stream wrappers, due to limitations of `realpath()`.

Props antonypuckey, pfiled.
Fixes #44563.


git-svn-id: https://develop.svn.wordpress.org/trunk@45177 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:00:42 +00:00