Pascal Birchler
1f153b0d12
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 .
Built from https://develop.svn.wordpress.org/trunk@48543
git-svn-id: http://core.svn.wordpress.org/trunk@48305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:14:07 +00:00
desrosj
b6b2f2ac3f
Administration: Ensure SVG icons in admin menus are correctly colored.
...
Props ryelle.
Fixes #50555 .
Built from https://develop.svn.wordpress.org/trunk@48542
git-svn-id: http://core.svn.wordpress.org/trunk@48304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:10:06 +00:00
Sergey Biryukov
830f0b6563
Sitemaps: Rename `wp_get_sitemaps_providers()` to `wp_get_sitemap_providers()`.
...
Follow-up to [48536], [48540].
Props pbiron, swissspidy, SergeyBiryukov.
See #50724 .
Built from https://develop.svn.wordpress.org/trunk@48541
git-svn-id: http://core.svn.wordpress.org/trunk@48303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:06:04 +00:00
Pascal Birchler
694b407297
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 .
Built from https://develop.svn.wordpress.org/trunk@48540
git-svn-id: http://core.svn.wordpress.org/trunk@48302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:57:04 +00:00
Sergey Biryukov
1c52ad8d3f
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 .
Built from https://develop.svn.wordpress.org/trunk@48539
git-svn-id: http://core.svn.wordpress.org/trunk@48301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:53:04 +00:00
Sergey Biryukov
bec9fa5010
Site Health: Remove `parse_ini_size()`, use the existing `wp_convert_hr_to_bytes()` function instead.
...
Follow-up to [48535].
See #50038 .
Built from https://develop.svn.wordpress.org/trunk@48538
git-svn-id: http://core.svn.wordpress.org/trunk@48300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:40:03 +00:00
desrosj
3dda74c337
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 .
Built from https://develop.svn.wordpress.org/trunk@48537
git-svn-id: http://core.svn.wordpress.org/trunk@48299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:38:03 +00:00
Sergey Biryukov
12daeec1f7
Sitemaps: Rename 'sitemap' to 'provider' in `WP_Sitemaps_Registry` class.
...
This class is for registering sitemap providers, not individual sitemaps.
Props swissspidy.
Fixes #50724 .
Built from https://develop.svn.wordpress.org/trunk@48536
git-svn-id: http://core.svn.wordpress.org/trunk@48298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:29:02 +00:00
whyisjake
73a8fb4cc3
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.
Built from https://develop.svn.wordpress.org/trunk@48535
git-svn-id: http://core.svn.wordpress.org/trunk@48297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:21:02 +00:00
Sergey Biryukov
d1822e81ba
Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off.
...
Props ramiy.
Fixes #50721 .
Built from https://develop.svn.wordpress.org/trunk@48534
git-svn-id: http://core.svn.wordpress.org/trunk@48296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 14:42:05 +00:00
Sergey Biryukov
3cd9474d68
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 .
Built from https://develop.svn.wordpress.org/trunk@48533
git-svn-id: http://core.svn.wordpress.org/trunk@48295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 14:37:07 +00:00
Pascal Birchler
1f27914191
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 .
Built from https://develop.svn.wordpress.org/trunk@48532
git-svn-id: http://core.svn.wordpress.org/trunk@48294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 13:57:05 +00:00
Sergey Biryukov
6d207771d3
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 .
Built from https://develop.svn.wordpress.org/trunk@48531
git-svn-id: http://core.svn.wordpress.org/trunk@48293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 13:15:05 +00:00
Sergey Biryukov
ee60c40806
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 .
Built from https://develop.svn.wordpress.org/trunk@48530
git-svn-id: http://core.svn.wordpress.org/trunk@48292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:58:02 +00:00
Sergey Biryukov
9ce7bd633b
Docs: Improve description for `edit_post()`.
...
Props stevenlinx.
Fixes #50713 .
Built from https://develop.svn.wordpress.org/trunk@48529
git-svn-id: http://core.svn.wordpress.org/trunk@48291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:49:03 +00:00
Sergey Biryukov
de462d2c20
Site Health: Correct the message for snoozed email verifications.
...
Follow-up to [48522].
Fixes #48333 .
Built from https://develop.svn.wordpress.org/trunk@48528
git-svn-id: http://core.svn.wordpress.org/trunk@48290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:37:07 +00:00
ellatrix
ec05ee2f5d
Editor: update packages for Beta 3
...
Fixes #50712 .
Built from https://develop.svn.wordpress.org/trunk@48527
git-svn-id: http://core.svn.wordpress.org/trunk@48289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:14:37 +00:00
TimothyBlynJacobs
b8d5e161eb
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.
Built from https://develop.svn.wordpress.org/trunk@48526
git-svn-id: http://core.svn.wordpress.org/trunk@48288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:03:05 +00:00
Andrew Ozz
562a59f553
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 .
Built from https://develop.svn.wordpress.org/trunk@48525
git-svn-id: http://core.svn.wordpress.org/trunk@48287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 03:00:04 +00:00
TimothyBlynJacobs
84701f3812
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 .
Built from https://develop.svn.wordpress.org/trunk@48524
git-svn-id: http://core.svn.wordpress.org/trunk@48286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 01:38:03 +00:00
whyisjake
7f92797960
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.
Built from https://develop.svn.wordpress.org/trunk@48523
git-svn-id: http://core.svn.wordpress.org/trunk@48285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 00:57:05 +00:00
whyisjake
7112440881
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.
Built from https://develop.svn.wordpress.org/trunk@48522
git-svn-id: http://core.svn.wordpress.org/trunk@48284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 00:43:02 +00:00
whyisjake
5c836585d1
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.
Built from https://develop.svn.wordpress.org/trunk@48521
git-svn-id: http://core.svn.wordpress.org/trunk@48283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 00:29:02 +00:00
Sergey Biryukov
e4ce35dd11
I18N: Add context to some plugin and theme strings for consistency.
...
Props ramiy, audrasjb.
Fixes #50710 .
Built from https://develop.svn.wordpress.org/trunk@48520
git-svn-id: http://core.svn.wordpress.org/trunk@48282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 23:14:05 +00:00
Sergey Biryukov
82ce41ff51
I18N: Mark the strings with plugin and theme names in email notifications for translation.
...
Follow-up to [48517].
See #50350 .
Built from https://develop.svn.wordpress.org/trunk@48519
git-svn-id: http://core.svn.wordpress.org/trunk@48281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 21:25:06 +00:00
Andrew Ozz
c2639c74ff
REST API, Media: Fix/improve the inline docs and name of the new `wp_edited_image_metadata` filter.
...
Props desrosj, azaozz.
See #44405 .
Built from https://develop.svn.wordpress.org/trunk@48518
git-svn-id: http://core.svn.wordpress.org/trunk@48280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 21:04:03 +00:00
desrosj
02f200df1d
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 .
Built from https://develop.svn.wordpress.org/trunk@48517
git-svn-id: http://core.svn.wordpress.org/trunk@48279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 18:28:03 +00:00
Sergey Biryukov
a368a22625
Tests: Simplify some assertions in `phpunit/tests/media.php`.
...
Correct comments per the documentation standards.
Follow-up to [48496].
See #22101 .
Built from https://develop.svn.wordpress.org/trunk@48516
git-svn-id: http://core.svn.wordpress.org/trunk@48278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 15:49:07 +00:00
desrosj
d298aec258
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 .
Built from https://develop.svn.wordpress.org/trunk@48515
git-svn-id: http://core.svn.wordpress.org/trunk@48277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 13:41:05 +00:00
desrosj
bf8d963cfc
Bundled Themes: Rebuild Twenty Nineteen’s RTL stylesheet.
...
This adds the changes from [48073] to the `style-rtl.css` file.
See #45912 .
Built from https://develop.svn.wordpress.org/trunk@48514
git-svn-id: http://core.svn.wordpress.org/trunk@48276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 13:29:05 +00:00
desrosj
cd6e936103
Embeds: Correct the version number when Hulu was deprecated.
...
Follow up of [48512]
See #50676 .
Built from https://develop.svn.wordpress.org/trunk@48513
git-svn-id: http://core.svn.wordpress.org/trunk@48275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 13:14:04 +00:00
desrosj
511e9cfade
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 .
Built from https://develop.svn.wordpress.org/trunk@48512
git-svn-id: http://core.svn.wordpress.org/trunk@48274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 13:12:01 +00:00
Sergey Biryukov
637d9df95a
Docs: Improve description for `add_user_to_blog()`.
...
Props stevenlinx.
Fixes #50701 .
Built from https://develop.svn.wordpress.org/trunk@48511
git-svn-id: http://core.svn.wordpress.org/trunk@48273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 11:54:05 +00:00
Andrew Ozz
689c224476
Media: Migrate the data from the attachment post of the parent image when saving an edited image. Copy:
...
- `post_title`,
- `post_content` (image description),
- `post_excerpt` (image caption as saved in the DB),
- `_wp_attachment_image_alt` meta (alt text for the img tag as saved in the DB).
Props spacedmonkey, joedolson, TimothyBlynJacobs, azaozz.
Fixes #50675 .
Built from https://develop.svn.wordpress.org/trunk@48510
git-svn-id: http://core.svn.wordpress.org/trunk@48272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-19 21:19:04 +00:00
Andrew Ozz
efb77b4a65
Upgrade/install: Fix/clarify the "Upload in a zip format" string.
...
Props greenshady, mariovalney.
See #9757 .
Built from https://develop.svn.wordpress.org/trunk@48509
git-svn-id: http://core.svn.wordpress.org/trunk@48271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-19 17:11:02 +00:00
John Blackbourn
c3f787b8ff
Docs: Miscellaneous docblock corrections.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48508
git-svn-id: http://core.svn.wordpress.org/trunk@48270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-18 22:11:02 +00:00
Sergey Biryukov
d9a18d259b
Coding Standards: Use strict comparison in `wp-includes/wp-db.php`.
...
Props jenilk.
Fixes #49453 .
Built from https://develop.svn.wordpress.org/trunk@48507
git-svn-id: http://core.svn.wordpress.org/trunk@48269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-18 11:39:04 +00:00
desrosj
c482c8e8ad
Administration: Reverse the arrow direction for database import/export icons.
...
In [48456], database import and export icons were introduced. However, the arrows were pointing in the wrong directions. This reverses the arrows to be pointing correctly based on the action described in the name.
Props johnbillion, joen, desrosj, empireoflight.
Fixes #49913 .
Built from https://develop.svn.wordpress.org/trunk@48506
git-svn-id: http://core.svn.wordpress.org/trunk@48268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-17 17:11:03 +00:00
Sergey Biryukov
38400754a1
Options, Meta APIs: Reorder the parameters of `default_{$meta_type}_metadata` filter.
...
This brings consistency with the `get_{$meta_type}_metadata` filter and more closely matches the `get_metadata_default()` function signature.
Follow-up to [48502].
Props spacedmonkey.
See #43941 .
Built from https://develop.svn.wordpress.org/trunk@48505
git-svn-id: http://core.svn.wordpress.org/trunk@48267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-17 15:15:03 +00:00
Sergey Biryukov
4cd355c5cf
Docs: Correct documentation for the `$meta_key` parameter of `get_metadata_default()`.
...
The parameter is required, not optional.
Follow-up to [48502].
See #43941 .
Built from https://develop.svn.wordpress.org/trunk@48504
git-svn-id: http://core.svn.wordpress.org/trunk@48266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-17 13:49:03 +00:00
whyisjake
59ee72969d
Plugins: Update the height of the Install Now button for new plugins.
...
Due to Thickbox shenanigans, the buttons height needed to be shrunk a little to center properly in the iframe.
Fixes #49828 .
Props ibachal, Otto42, afercia.
Built from https://develop.svn.wordpress.org/trunk@48503
git-svn-id: http://core.svn.wordpress.org/trunk@48265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-17 06:29:06 +00:00
TimothyBlynJacobs
f7268adfbf
Meta: Reorder the get_metadata_default() signature to match get_metadata().
...
The order of parameters in `get_metadata_default()` did not match the signature of `get_metadata()`. This could be confusing for developers who are familiar with the existing metadata API.
Fixes #43941 .
Props SergeyBiryukov, spacedmonkey, johnjamesjacoby.
Built from https://develop.svn.wordpress.org/trunk@48502
git-svn-id: http://core.svn.wordpress.org/trunk@48264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-17 02:59:08 +00:00
whyisjake
265574802b
Build/Test Tools: Bump lodash in twentytwenty as part of a security audit.
...
lodash: 4.17.15 👉 4.17.19
See #49768 .
Props: dependabot.
Built from https://develop.svn.wordpress.org/trunk@48501
git-svn-id: http://core.svn.wordpress.org/trunk@48263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 22:24:11 +00:00
whyisjake
da7a54d206
Administration: Fix an index inconsistency in `get_admin_page_title()` function.
...
Ensure that `get_admin_page_title()` returns a value from pages registered using `add_menu_page()`.
Fixes #46081 .
Props grapestain, valentinbora, SergeyBiryukov, audrasjb.
Built from https://develop.svn.wordpress.org/trunk@48500
git-svn-id: http://core.svn.wordpress.org/trunk@48262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 22:15:07 +00:00
whyisjake
322e38e285
Code Formatting: Fix some formatting around `WP_REST_Attachments_Controller` tests.
...
See #50565 .
Built from https://develop.svn.wordpress.org/trunk@48499
git-svn-id: http://core.svn.wordpress.org/trunk@48261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 22:11:08 +00:00
Andrew Ozz
2d728713ac
REST API: Prevent attachment ID/image source mismatch when editing an image.
...
Fixes #50565 .
Built from https://develop.svn.wordpress.org/trunk@48498
git-svn-id: http://core.svn.wordpress.org/trunk@48260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 21:56:08 +00:00
whyisjake
4a237f2d48
Posts, Post Types: Ensure that all post stati are countable in `wp_count_posts`.
...
When `wp_count_posts()` is cached, it does so with all statuses defaulted to 0. The problem is however, if this is called before all plugins have registered their desired statuses, they won't have that default.
Fixes #49685 .
Props obliviousharmony, SergeyBiryukov.
Built from https://develop.svn.wordpress.org/trunk@48497
git-svn-id: http://core.svn.wordpress.org/trunk@48259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 21:44:04 +00:00
whyisjake
69aaab5108
Feeds: Ensure that galleries can be output as a list of links in feeds.
...
Adjusts the gallery shortcode handler to check for the `link` attribute when outputting to a feed.
Fixes #22101 .
Props ifrins, mdgl, SergeyBiryukov, chriscct7, stevenkword, iworks, DrewAPicture, birgire, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48496
git-svn-id: http://core.svn.wordpress.org/trunk@48258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 21:31:03 +00:00
whyisjake
a53b741359
Coding Standards: Update the docblock to remove superflous `since`.
...
The `@deprecated` DocBlock tag should start with the version followed by the description of what to use instead.
Fixes #44959 .
Props keesiemeijer, sabernhardt.
Built from https://develop.svn.wordpress.org/trunk@48495
git-svn-id: http://core.svn.wordpress.org/trunk@48257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 21:12:08 +00:00
youknowriad
6a88c91d3a
Block Editor: Remove the gutenberg domain name from the block-patterns.php file
...
Props SergeyBiryukov.
Fixes #50669 .
Built from https://develop.svn.wordpress.org/trunk@48494
git-svn-id: http://core.svn.wordpress.org/trunk@48256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 14:13:03 +00:00