Commit Graph

42213 Commits

Author SHA1 Message Date
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
Andrew Ozz
030f2a4eee 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48510 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-19 21:17:55 +00:00
Andrew Ozz
b39df4606a Upgrade/install: Fix/clarify the "Upload in a zip format" string.
Props greenshady, mariovalney.
See #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48509 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-19 17:09:43 +00:00
John Blackbourn
d10a86ad1d Docs: Miscellaneous docblock corrections.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48508 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-18 22:09:57 +00:00
Sergey Biryukov
9331f7a73f Coding Standards: Use strict comparison in wp-includes/wp-db.php.
Props jenilk.
Fixes #49453.

git-svn-id: https://develop.svn.wordpress.org/trunk@48507 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-18 11:37:59 +00:00
Jonathan Desrosiers
d54b8f7335 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48506 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-17 17:09:37 +00:00
Sergey Biryukov
3b5d373043 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48505 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-17 15:14:00 +00:00
Sergey Biryukov
2d0e9b1057 Docs: Correct documentation for the $meta_key parameter of get_metadata_default().
The parameter is required, not optional.

Follow-up to [48502].

See #43941.

git-svn-id: https://develop.svn.wordpress.org/trunk@48504 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-17 13:47:23 +00:00
Jake Spurlock
1c1a9de834 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@48503 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-17 06:27:09 +00:00
Timothy Jacobs
d525642dd1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@48502 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-17 02:57:04 +00:00
Jake Spurlock
f75522ecfc Build/Test Tools: Bump lodash in twentytwenty as part of a security audit.
lodash: 4.17.15 👉 4.17.19

See #49768.
Props: dependabot.



git-svn-id: https://develop.svn.wordpress.org/trunk@48501 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 22:22:05 +00:00
Jake Spurlock
162afe2451 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@48500 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 22:13:54 +00:00
Jake Spurlock
e7671336a4 Code Formatting: Fix some formatting around WP_REST_Attachments_Controller tests.
See #50565.



git-svn-id: https://develop.svn.wordpress.org/trunk@48499 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 22:09:35 +00:00
Andrew Ozz
0aab2584a0 REST API: Prevent attachment ID/image source mismatch when editing an image.
Fixes #50565.

git-svn-id: https://develop.svn.wordpress.org/trunk@48498 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 21:54:37 +00:00
Jake Spurlock
082cb0ab20 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@48497 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 21:42:48 +00:00
Jake Spurlock
ceccb7b3b1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@48496 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 21:29:05 +00:00
Jake Spurlock
0fa4801a88 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@48495 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 21:10:03 +00:00
Riad Benguella
5b9b012e53 Block Editor: Remove the gutenberg domain name from the block-patterns.php file
Props SergeyBiryukov.
Fixes #50669.


git-svn-id: https://develop.svn.wordpress.org/trunk@48494 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 14:11:40 +00:00
Sergey Biryukov
da730fce4d Upgrade/Install: Check if the theme installer skin's overwrite property exists in Theme_Upgrader::install_strings().
This ensures consistency with `Plugin_Upgrader::install_strings()` and resolves an issue caused by the property not existing in other upgrader implementations.

Props schlessera, azaozz.
See #50670.

git-svn-id: https://develop.svn.wordpress.org/trunk@48493 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 13:17:13 +00:00
Riad Benguella
bd63261888 Block Editor: Add theme support flag to opt-out of Core Block Patterns.
WordPress Core comes by default with a number of block patterns and a frequent request was to be able to opt-out of the Core block patterns. 
You can now opt-out using remove_theme_support( 'core-block-patterns' )

Props desrosj, nosolosw.
Fixes #50669.


git-svn-id: https://develop.svn.wordpress.org/trunk@48492 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 11:48:49 +00:00
Sergey Biryukov
b001723394 Docs: Add return value description for register_theme_directory().
Props stevenlinx.
Fixes #50665.

git-svn-id: https://develop.svn.wordpress.org/trunk@48491 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-15 12:08:32 +00:00
Sergey Biryukov
caefeeea17 Docs: Link to add_theme_support() for the list of supported theme features in current_theme_supports() and related functions.
Props stevenlinx.
Fixes #50657.

git-svn-id: https://develop.svn.wordpress.org/trunk@48490 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-15 11:21:23 +00:00
Jake Spurlock
afb11188d2 Post 5.5 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@48482 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 17:39:48 +00:00
Jake Spurlock
8921997100 WordPress 5.5 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@48481 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 17:00:11 +00:00
Sergey Biryukov
c843cf19c3 Taxonomy: Make some adjustments to handling default terms for custom taxonomies:
* Move default term assignment from `wp_set_object_terms()` to `wp_insert_post()`.
* Make sure the passed taxonomy list overwrites the existing list if not empty.
* Remove the default term option on `unregister_taxonomy()`.
* Prevent deletion of the default term in `wp_delete_term()`.

Props enrico.sorcinelli, TimothyBlynJacobs.
See #43517.

git-svn-id: https://develop.svn.wordpress.org/trunk@48480 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 16:39:44 +00:00
Andrea Fercia
9181ecff85 Accessibility: Security: Improves the accessible audible messages for Plugins & Themes Auto-Updates.
- changes the politeness level of the two error messages introduced in [47835] to `assertive`
- remove unnecessary `polite` parameters as that's the default value

See #50512, #50052.



git-svn-id: https://develop.svn.wordpress.org/trunk@48479 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 15:44:16 +00:00
Sergey Biryukov
74b985fd7d Docs: Synchronize description for the $allowed_html parameter of various KSES functions.
Follow-up to [43016].

Props Christian1012, jdgrimes, markparnell.
Fixes #39542. See #33801.

git-svn-id: https://develop.svn.wordpress.org/trunk@48478 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:39:16 +00:00
Jonathan Desrosiers
7bdff387e2 General: Rename the $new_whitelist_options global variable.
This change renames `$new_whitelist_options` to `$new_allowed_options`. This makes the variable’s purpose more clear, and promotes using more inclusive language.

For backwards compatibility, the new variable is passed by reference to the old one.

Follow up to [48121].

Props ayeshrajans, desrosj, jorbin, SergeyBiryukov.
See #50413.
Fixes #50434.

git-svn-id: https://develop.svn.wordpress.org/trunk@48477 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:31:22 +00:00
swissspidy
0ee9100e6d Sitemaps: Ensure entry for ‘page’ post type sitemap in index.
If there are no pages and no static homepage, there will still be one sitemap including the homepage URL.

This change ensures that this sitemap is correctly listed in the sitemap index.

Props Chouby, pacifika, elrae.
Fixes #50571.

git-svn-id: https://develop.svn.wordpress.org/trunk@48476 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:24:02 +00:00
John Blackbourn
7d5b488b3b Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48475 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:08:28 +00:00
Pascal Birchler
efb0b58598 Sitemaps: Exclude post types and taxonomies that are not publicly queryable.
Props Cybr.
Fixes #50607.

git-svn-id: https://develop.svn.wordpress.org/trunk@48474 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:54:49 +00:00
John Blackbourn
fa9e258750 Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48473 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:54:26 +00:00
Pascal Birchler
585f623b4d Sitemaps: Add missing slash when calling home_url() for consistency.
Props Chouby.
Fixes #50570.

git-svn-id: https://develop.svn.wordpress.org/trunk@48472 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:52:43 +00:00
Pascal Birchler
649b7aae92 Sitemaps: Add wrapping <div> around sitemap in stylesheet.
This makes it easier to style the sitemap and for example center the entire content area.

Props ramiy.
Fixes #50622.

git-svn-id: https://develop.svn.wordpress.org/trunk@48471 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:43:54 +00:00
Pascal Birchler
cf4897f5d8 Sitemaps: Pass full paths to home_url() calls.
This makes it easier for plugins using the `home_url` filter to detect sitemap URLs.

Props Chouby.
Fixes #50592.

git-svn-id: https://develop.svn.wordpress.org/trunk@48470 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:41:47 +00:00
Ella van Durpe
479a125882 Editor: update packages for beta 2
Fixes #50651.



git-svn-id: https://develop.svn.wordpress.org/trunk@48469 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:36:39 +00:00
Sergey Biryukov
63ad9247c1 Privacy: Set the direction for the "Username or email address" field on privacy screens to LTR.
This is consistent with other email inputs across the admin.

Follow-up to [27743], [42967].

Props man4toman, sushyant.
Fixes #50625.

git-svn-id: https://develop.svn.wordpress.org/trunk@48468 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:15:28 +00:00
Sergey Biryukov
a128b52eb0 Docs: Improve description for get_blog_post().
Props stevenlinx.
Fixes #50655.

git-svn-id: https://develop.svn.wordpress.org/trunk@48467 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:05:01 +00:00