Make WordPress Core

Ticket #36907: 36907.patch

File 36907.patch, 970 bytes (added by spacedmonkey, 9 years ago)
  • src/wp-includes/query.php

     
    37353735                        // Fetch sticky posts that weren't in the query results
    37363736                        if ( !empty($sticky_posts) ) {
    37373737                                $stickies = get_posts( array(
    3738                                         'post__in' => $sticky_posts,
    3739                                         'post_type' => $post_type,
    3740                                         'post_status' => 'publish',
    3741                                         'nopaging' => true
     3738                                        'cache_results'          => $q['cache_results'],
     3739                                        'post__in'               => $sticky_posts,
     3740                                        'post_type'              => $post_type,
     3741                                        'post_status'            => 'publish',
     3742                                        'posts_per_page'         => count( $sticky_posts ),
     3743                                        'suppress_filters'       => $q['suppress_filters'],
     3744                                        'update_post_meta_cache' => $q['update_post_meta_cache'],
     3745                                        'update_post_term_cache' => $q['update_post_term_cache'],
    37423746                                ) );
    37433747
    37443748                                foreach ( $stickies as $sticky_post ) {