Make WordPress Core

Ticket #55633: 55633.diff

File 55633.diff, 1003 bytes (added by pbiron, 2 years ago)
  • src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

    From 215fb7ff0b6c893c6740dcb27875a3ebd13d53ed Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Thu, 28 Apr 2022 08:37:59 -0600
    Subject: [PATCH] Ignore sticky posts by default in post sitemaps.
    
    ---
     src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
    index 61dffdbd79..b9f2fd3185 100644
    a b class WP_Sitemaps_Posts extends WP_Sitemaps_Provider { 
    219219                                'no_found_rows'          => true,
    220220                                'update_post_term_cache' => false,
    221221                                'update_post_meta_cache' => false,
     222                                'ignore_sticky_posts'    => true, // sticky posts will still appear, but they won't be moved to the front.
    222223                        ),
    223224                        $post_type
    224225                );