Commit Graph

42150 Commits

Author SHA1 Message Date
Sergey Biryukov
712f548664 Site Health: Fix some typos in the test for plugin and theme auto-updates.
Follow-up to [48548], [48558], [48559].

See #50662.

git-svn-id: https://develop.svn.wordpress.org/trunk@48560 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-22 00:15:33 +00:00
Sergey Biryukov
874e6afdca Site Health: Correct inverted logic for themes in the test for plugin and theme auto-updates.
Follow-up to [48548], [48558].

See #50662.

git-svn-id: https://develop.svn.wordpress.org/trunk@48559 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-22 00:13:21 +00:00
Sergey Biryukov
8cbd2ca439 Site Health: Add the test for plugin and theme auto-updates to WP_Site_Health::get_tests().
This ensures that the test actually runs.

Follow-up to [48548].

See #50662.

git-svn-id: https://develop.svn.wordpress.org/trunk@48558 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-22 00:05:45 +00:00
Sergey Biryukov
f840dabcc6 Widgets: Make sure image widgets with custom image size render captions.
Props kasparsd, JavierCasares, audrasjb.
Fixes #50160.

git-svn-id: https://develop.svn.wordpress.org/trunk@48557 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 23:12:22 +00:00
Sergey Biryukov
3da487037d REST API: Use consistent error messages when managing network plugins.
Props ramiy.
Fixes #50729.

git-svn-id: https://develop.svn.wordpress.org/trunk@48556 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 21:59:46 +00:00
Timothy Jacobs
df8399dce5 REST API: Optimize rest_filter_response_by_context performance.
In [47758] a new function `rest_filter_response_by_context` was introduced to expand the JSON schema features supported by the context filtering mechanism.

This commit improves the performance of that function by eliminating repetitive comparisons and loops. Additionally, it improves multi-type support for object + array types.

Fixes #50700.
Props dlh.


git-svn-id: https://develop.svn.wordpress.org/trunk@48555 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 21:20:22 +00:00
Sergey Biryukov
b11757e4ed Site Health: Use a consistent label for theme auto-updates in debug data.
Props audrasjb.
Fixes #50728.

git-svn-id: https://develop.svn.wordpress.org/trunk@48554 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 21:04:57 +00:00
Sergey Biryukov
26362089c5 Sitemaps: Rename wp_register_sitemap() to wp_register_sitemap_provider().
Follow-up to [48536], [48540], [48541].

Props pbiron.
Fixes #50724.

git-svn-id: https://develop.svn.wordpress.org/trunk@48553 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 20:13:59 +00:00
Sergey Biryukov
44335fdc43 Site Health: Simplify the logic for displaying whether auto-updates are enabled for plugins and themes.
Remove some extra variables.

Follow-up to [48546], [48549].

See #50663.

git-svn-id: https://develop.svn.wordpress.org/trunk@48552 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 18:42:24 +00:00
Jake Spurlock
9875847c9e WordPress 5.5 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@48551 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 17:54:05 +00:00
Jake Spurlock
f3a6fc5716 WordPress 5.5 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@48550 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 17:30:06 +00:00
Sergey Biryukov
6440e85a2c Site Health: Rename the filters added in [48546] for clarity.
See #50663.

git-svn-id: https://develop.svn.wordpress.org/trunk@48549 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 17:06:55 +00:00
Jake Spurlock
5e14b1b5fd Site Health: Add tests to check for potential issues with plugin and theme auto-updates.
Fixes #50662.
Props desrosj, audrasjb.


git-svn-id: https://develop.svn.wordpress.org/trunk@48548 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 17:06:00 +00:00
Sergey Biryukov
ffef4daf88 Media: Pass the attachment ID to the wp_image_file_matches_image_meta filter.
Props spacedmonkey.
Fixes #50722.

git-svn-id: https://develop.svn.wordpress.org/trunk@48547 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:52:48 +00:00
Jake Spurlock
11fe34deb8 Site Health: Add auto-update information to for plugins and themes.
New filters:

* `plugin_auto_update_debug_str`
* `theme_auto_update_debug_str`

Fixes #50663.
Props pbiron, audrasjb, davidbaumwald.


git-svn-id: https://develop.svn.wordpress.org/trunk@48546 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:52:47 +00:00
Sergey Biryukov
e10083b7de I18N: Add context to some theme strings for consistency.
Props ramiy, ocean90.
Fixes #50709.

git-svn-id: https://develop.svn.wordpress.org/trunk@48545 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:31:06 +00:00
Sergey Biryukov
0da858ffae Site Health: Rename upload_max array key in file upload checks to max_effective_size for clarity.
Follow-up to [48535].

See #50038.

git-svn-id: https://develop.svn.wordpress.org/trunk@48544 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:18:53 +00:00
Pascal Birchler
7bcdf886c0 Sitemaps: Replace wp_sitemaps_register_providers filter with more suitable wp_sitemaps_add_provider filter.
The previous filter failed the goal of allowing developers to filter all providers before they are registered, since it only filtered the built-in ones.

The more specific `wp_sitemaps_add_provider` filter enables exactly that, as it filters every sitemap provider right before it is added to the sitemaps registry.

Props pbiron, pfefferle, Chouby, swissspidy.
Fixes #50660.

git-svn-id: https://develop.svn.wordpress.org/trunk@48543 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:12:49 +00:00
Jonathan Desrosiers
bea9ce74a7 Administration: Ensure SVG icons in admin menus are correctly colored.
Props ryelle.
Fixes #50555.

git-svn-id: https://develop.svn.wordpress.org/trunk@48542 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:08:44 +00:00
Sergey Biryukov
8c7fe179da Sitemaps: Rename wp_get_sitemaps_providers() to wp_get_sitemap_providers().
Follow-up to [48536], [48540].

Props pbiron, swissspidy, SergeyBiryukov.
See #50724.

git-svn-id: https://develop.svn.wordpress.org/trunk@48541 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 16:04:35 +00:00
Pascal Birchler
83b94f5cd6 Sitemaps: Rename wp_get_sitemaps() to wp_get_sitemaps_providers()
Following [48536], rename the function to match the rest of the sitemaps logic.

Also eliminates some dead code after [48523].

Props pbiron.
See #50724. See #50643.

git-svn-id: https://develop.svn.wordpress.org/trunk@48540 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:55:21 +00:00
Sergey Biryukov
3269e83801 Site Health: Move post_max_size and upload_max_filesize out of a translatable string in file upload checks.
Simplify some other strings, use a consistent format for translator comments.

Follow-up to [48535].

See #50038.

git-svn-id: https://develop.svn.wordpress.org/trunk@48539 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:51:22 +00:00
Sergey Biryukov
0d956d4013 Site Health: Remove parse_ini_size(), use the existing wp_convert_hr_to_bytes() function instead.
Follow-up to [48535].

See #50038.

git-svn-id: https://develop.svn.wordpress.org/trunk@48538 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:38:40 +00:00
Jonathan Desrosiers
09754a7cdd Editor: Ensure the required assets for the block directory are enqueued.
This fixes an issue where the block directory appears unstyled due to the stylesheets not being enqueued.

Props ryelle, timothyblynjacobs, earnjam.
Fixes #50661.

git-svn-id: https://develop.svn.wordpress.org/trunk@48537 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:36:17 +00:00
Sergey Biryukov
383540b7c4 Sitemaps: Rename 'sitemap' to 'provider' in WP_Sitemaps_Registry class.
This class is for registering sitemap providers, not individual sitemaps.

Props swissspidy.
Fixes #50724.

git-svn-id: https://develop.svn.wordpress.org/trunk@48536 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:27:48 +00:00
Jake Spurlock
5ffe591bec Site Health: Include new tests to check for the ability to upload files.
Several new checks:

* `max_file_uploads`
* `file_uploads`
* `post_max_size`
* `upload_max_filesize`
* `upload_max`
* `max_file_uploads`

In addition, new function `parse_ini_size()` that converts shorthand byte strings to bytes. Useful for size comparisons.

Fixes #50038.
Props dd32, donmhico, JavierCasares, SergeyBiryukov, ayeshrajans, Clorith, ipstenu, sabernhardt, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@48535 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 15:19:58 +00:00
Sergey Biryukov
3ef1fa5c6d Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off.
Props ramiy.
Fixes #50721.

git-svn-id: https://develop.svn.wordpress.org/trunk@48534 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 14:40:43 +00:00
Sergey Biryukov
cfb25b2e48 Block Editor: Move the add_action() call for _register_core_block_patterns_and_categories() above check_theme_switched().
Follow-up to [48492], [48531].

See #50669.

git-svn-id: https://develop.svn.wordpress.org/trunk@48533 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 14:35:13 +00:00
Pascal Birchler
38cade3b07 Sitemaps: Correctly enforce maximum number of sitemaps in index.
Before this change, the limit of 50k entries was enforced for the number of providers, not the amount of sitemaps all providers add to the index in total.

Props pbiron, swissspidy.
Fixes #50666.

git-svn-id: https://develop.svn.wordpress.org/trunk@48532 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 13:55:45 +00:00
Sergey Biryukov
fd9f7232e5 Block Editor: Move the add_action() call for _register_core_block_patterns_and_categories() to wp-includes/default-filters.php.
Follow-up to [48492].

Props desrosj.
Fixes #50669.

git-svn-id: https://develop.svn.wordpress.org/trunk@48531 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 13:13:54 +00:00
Sergey Biryukov
99f5b6019a Mail: Make sure the PHPMailer class is only required once if a plugin requires wp-includes/class-phpmailer.php directly.
Follow-up to [48033].

Props david.binda.
Fixes #50716. See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48530 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 12:56:40 +00:00
Sergey Biryukov
ea352ee2ab Docs: Improve description for edit_post().
Props stevenlinx.
Fixes #50713.

git-svn-id: https://develop.svn.wordpress.org/trunk@48529 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 12:47:58 +00:00
Sergey Biryukov
0f86642b82 Site Health: Correct the message for snoozed email verifications.
Follow-up to [48522].

Fixes #48333.

git-svn-id: https://develop.svn.wordpress.org/trunk@48528 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 12:35:32 +00:00
Ella van Durpe
69ec4264dc Editor: update packages for Beta 3
Fixes #50712.



git-svn-id: https://develop.svn.wordpress.org/trunk@48527 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 12:12:43 +00:00
Timothy Jacobs
74cc64d74e REST API: Issue a _doing_it_wrong when registering a route without a permission callback.
The REST API treats routes without a permission_callback as public. Because this happens without any warning to the user, if the permission callback is unintentionally omitted or misspelled, the endpoint can end up being available to the public. Such a scenario has happened multiple times in the wild, and the results can be catostrophic when it occurs.

For REST API routes that are intended to be public, it is recommended to set the permission callback to the `__return_true` built in function.

Fixes #50075.
Props rmccue, sorenbronsted, whyisjake, SergeyBiryukov, TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@48526 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 12:01:10 +00:00
Andrew Ozz
fcc52436cb REST API, Media: Add X-WP-Upload-Attachment-ID HTTP header to enable retrying of post-processing of edited images if the server runs out of resources. This is the same as after uploading a new image, will do up to five additional requests to let the server create all image sub-sizes.
Fixes #50711.

git-svn-id: https://develop.svn.wordpress.org/trunk@48525 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 02:59:00 +00:00
Timothy Jacobs
2daa951685 REST API: Make plugin installation tests more robust on alternate test environments.
The REST API plugin installation tests use the `upgrader_pre_download` filter to avoid downloading the test plugin from WordPress.org. Previously, this would apply to any upgrader, which caused issues if the testing environment required a language update.

Now, the filter only overwrites the file if the `Plugin_Upgrader` is being used which should hopefully prevent the issue.

Props pfefferle, TimothyBlynJacobs.
Fixes #50671.


git-svn-id: https://develop.svn.wordpress.org/trunk@48524 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 01:36:16 +00:00
Jake Spurlock
60d339cfde Sitemaps: Ensure correct HTTP status when sitemaps are disabled
If sitemaps are disabled, previously there would be a rewrite rule for the sitemap endpoint. This endpoint would display the homepage since there was a rewrite rule. Now, Sitemaps are loaded, and the proper HTTP headers are returned.

Fixes #50643.
Props swissspidy, kraftbj, donmhico.



git-svn-id: https://develop.svn.wordpress.org/trunk@48523 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 00:55:20 +00:00
Jake Spurlock
bd67e31f4b Site Health: Ensure that there is a human readable time for snoozed email verifications.
This will be the time the was proposed, added to the reminder interval.

Fixes #48333.
Props SergeyBiryukov, desrosj.



git-svn-id: https://develop.svn.wordpress.org/trunk@48522 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 00:41:35 +00:00
Jake Spurlock
4ba60208d4 Comments: Don't show the filter/pagination actions if there are no comments to list.
It doesn't make sense to be able to filter the comments list table when there are are no (trashed/spam) comments available.

Fixes #40188.
Props swissspidy, Jim_Panse, menakas, akbarhusen429, dinhtungdu, birgire, SergeyBiryukov, davidbaumwald, rebasaurus, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48521 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-21 00:27:46 +00:00
Sergey Biryukov
5674e7e085 I18N: Add context to some plugin and theme strings for consistency.
Props ramiy, audrasjb.
Fixes #50710.

git-svn-id: https://develop.svn.wordpress.org/trunk@48520 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 23:12:33 +00:00
Sergey Biryukov
364759ecb2 I18N: Mark the strings with plugin and theme names in email notifications for translation.
Follow-up to [48517].

See #50350.

git-svn-id: https://develop.svn.wordpress.org/trunk@48519 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 21:23:26 +00:00
Andrew Ozz
8406d5104c REST API, Media: Fix/improve the inline docs and name of the new wp_edited_image_metadata filter.
Props desrosj, azaozz.

See #44405.

git-svn-id: https://develop.svn.wordpress.org/trunk@48518 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 21:02:13 +00:00
Jonathan Desrosiers
83e78d8cdd Administration: Include the new plugin and theme versions in email notifications.
This helps administrators keep track of which versions of plugins and themes are running on their site when auto-updates occur.

Props audrasjb, pbiron.
Fixes #50350.

git-svn-id: https://develop.svn.wordpress.org/trunk@48517 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 18:26:18 +00:00
Sergey Biryukov
fa7b1bbb99 Tests: Simplify some assertions in phpunit/tests/media.php.
Correct comments per the documentation standards.

Follow-up to [48496].

See #22101.

git-svn-id: https://develop.svn.wordpress.org/trunk@48516 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 15:47:37 +00:00
Jonathan Desrosiers
e80b4f64bf Build/Test Tools: Update NPM packages in Twenty Nineteen.
This updates three packages:
- `@wordpress/browserslist-config` from `2.5.0` to `2.7.0`
- `autoprefixer` from `9.6.0` to `9.8.5`.
- `chokidar-cli` from `2.0.0` to `2.1.0`

See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@48515 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 13:39:34 +00:00
Jonathan Desrosiers
167a8769e7 Bundled Themes: Rebuild Twenty Nineteen’s RTL stylesheet.
This adds the changes from [48073] to the `style-rtl.css` file.

See #45912.

git-svn-id: https://develop.svn.wordpress.org/trunk@48514 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 13:27:58 +00:00
Jonathan Desrosiers
b98a607ca5 Embeds: Correct the version number when Hulu was deprecated.
Follow up of [48512]
See #50676.

git-svn-id: https://develop.svn.wordpress.org/trunk@48513 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 13:12:22 +00:00
Jonathan Desrosiers
0713ca14f9 Embeds: Remove Hulu from the list of supported oEmbed providers.
The oEmbed service for Hulu no longer works and appears to have been silently disabled.

Props tacitonic, talldanwp, youknowriad, bph.
Fixes #50676.

git-svn-id: https://develop.svn.wordpress.org/trunk@48512 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 13:10:36 +00:00
Sergey Biryukov
0c19e1abd0 Docs: Improve description for add_user_to_blog().
Props stevenlinx.
Fixes #50701.

git-svn-id: https://develop.svn.wordpress.org/trunk@48511 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-20 11:52:59 +00:00