Commit Graph

39661 Commits

Author SHA1 Message Date
Andrew Duthie 7bdef3d3ef Editor: Update packages to apply bugfixes from Gutenberg 5.5.
- @wordpress/block-editor@2.0.1
- @wordpress/block-library@2.4.4
- @wordpress/blocks@6.2.4
- @wordpress/components@7.3.1
- @wordpress/dom@2.2.4
- @wordpress/e2e-tests@1.1.4
- @wordpress/edit-post@3.3.4
- @wordpress/editor@9.2.4
- @wordpress/format-library@1.4.4
- @wordpress/list-reusable-blocks@1.3.4
- @wordpress/nux@3.2.4

Props iseulde, kjellr, aduth, get_dave, talldanwp, jorgefilipecosta, afercia, nosolosw, jasmussen, netweb .

See https://github.com/WordPress/gutenberg/pull/14987 .
See https://github.com/WordPress/gutenberg/pull/15020 .
Fixes #46951 .


git-svn-id: https://develop.svn.wordpress.org/trunk@45255 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-22 12:38:50 +00:00
Sergey Biryukov cfc3a4f9b7 Docs: Correct `@param` type for `$deprecated` and `$plugin_rel_path` arguments of `load_plugin_textdomain()`.
Props sudar.
Fixes #43304.

git-svn-id: https://develop.svn.wordpress.org/trunk@45254 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 14:21:00 +00:00
Sergey Biryukov 49a845493f Docs: Add missing `@since` tag for `WP_Recovery_Mode_Cookie_Service::parse_cookie()`.
Props mukesh27.
Fixes #46993.

git-svn-id: https://develop.svn.wordpress.org/trunk@45253 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:59:24 +00:00
Sergey Biryukov f7dba2af72 Networks and Sites: Use correct escaping function for classes added via ` ms_user_list_site_class` filter.
Props david.binda.
Fixes #46990. See #41146.

git-svn-id: https://develop.svn.wordpress.org/trunk@45252 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:50:32 +00:00
Sergey Biryukov b3d9869efc Docs: Correct `@return` description for `get_privacy_policy_template()`.
Props tmatsuur.
Fixes #46989. See #44005.

git-svn-id: https://develop.svn.wordpress.org/trunk@45251 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:45:08 +00:00
Sergey Biryukov 4623540ad1 Bundled Themes: Update `readme.txt` files to pass Theme Review guidelines.
Props rabmalin.
Fixes #45871.

git-svn-id: https://develop.svn.wordpress.org/trunk@45250 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:40:14 +00:00
Sergey Biryukov 64d225cd00 Docs: Correct `@return` description for `get_dirsize()`.
Props wpboss, tmatsuur.
Fixes #46987.

git-svn-id: https://develop.svn.wordpress.org/trunk@45249 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:38:04 +00:00
Andrea Fercia 7c623d5304 Accessibility: Improve the "Alt text" description styles for small screens.
Amends [44900].
See #41612.


git-svn-id: https://develop.svn.wordpress.org/trunk@45248 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 21:42:48 +00:00
Adam Silverstein 9e3c57c2ff Feeds: improve structure and naming of feed build date helper function.
Simplify overall code structure by passing the required format to the helper function.
Clarify functionality by renaming `get_last_build_date` to `get_feed_build_date`.

Props pento, spacedmonkey.
Fixes #4575.



git-svn-id: https://develop.svn.wordpress.org/trunk@45247 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 17:07:07 +00:00
Dominik Schilling 1eb665b20c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45246 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 16:25:05 +00:00
Dominik Schilling eda377ba9e Site Health: Provide context for tab headings to be able to distinguish them from existing strings.
See #46573.

git-svn-id: https://develop.svn.wordpress.org/trunk@45245 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 16:05:17 +00:00
Dominik Schilling 18e373dea4 Site Health: Enable JavaScript translations for the `site-health` script.
See #46683.

git-svn-id: https://develop.svn.wordpress.org/trunk@45244 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 15:40:37 +00:00
Gary Pendergast b074b74489 CSS: Remove the units from `line-height` properties in `common.css`.
Props ianbelanger, talldanwp.
Fixes #46493.



git-svn-id: https://develop.svn.wordpress.org/trunk@45243 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 06:01:56 +00:00
Gary Pendergast c1f17e3fe9 KSES: Add `background-position` and `grid-template-columns` as safe CSS properties.
Props aduth.
Fixes #46597.



git-svn-id: https://develop.svn.wordpress.org/trunk@45242 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 05:55:35 +00:00
Andrew Ozz 25bc196513 Site Health info tab: fix replacing the size strings in the copied info.
Props xkon.
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45241 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 04:50:45 +00:00
Gary Pendergast 0da79e252d Emoji: Upgrade Twemoji to 12.0.1.
As this point release doesn't modify any images, only adding a few missing ones, we don't need to change the CDN location.

Props earnjam.
Fixes #46805.



git-svn-id: https://develop.svn.wordpress.org/trunk@45240 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 02:10:12 +00:00
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