Sitemaps: Remove duplicate sticky Posts from Sitemap Post Query.

This changeset sets the `ignore_sticky_posts` parameter to `true` in the default arguments passed to `wp_sitemaps_posts_query_args`.

Props RavanH, pbiron, swissspidy, audrasjb, SergeyBiryukov.
Fixes #55633.

Built from https://develop.svn.wordpress.org/trunk@53548


git-svn-id: http://core.svn.wordpress.org/trunk@53137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-06-21 13:18:10 +00:00
parent b8290da037
commit ea5c6469c9
2 changed files with 2 additions and 1 deletions

View File

@ -219,6 +219,7 @@ class WP_Sitemaps_Posts extends WP_Sitemaps_Provider {
'no_found_rows' => true,
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'ignore_sticky_posts' => true, // sticky posts will still appear, but they won't be moved to the front.
),
$post_type
);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53547';
$wp_version = '6.1-alpha-53548';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.