Make WordPress Core


Ignore:
Timestamp:
03/25/2022 09:54:52 AM (4 years ago)
Author:
spacedmonkey
Message:

Query: Ensure that sticky post query returns all sticky posts.

Ensure that the posts_per_page parameter submit to sticky post query matches the number of sticky posts requested.

Follow-up to [52982]

Props Spacedmonkey, peterwilsoncc.
See #36907.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r52985 r52990  
    32643264                        'post_type'              => $post_type,
    32653265                        'post_status'            => 'publish',
     3266                        'posts_per_page'         => count( $sticky_posts ),
    32663267                        'suppress_filters'       => $q['suppress_filters'],
    32673268                        'cache_results'          => $q['cache_results'],
Note: See TracChangeset for help on using the changeset viewer.