Ticket #23336: 23336.diff
File 23336.diff, 776 bytes (added by , 12 years ago) |
---|
-
wp-includes/query.php
2730 2730 // Put sticky posts at the top of the posts array 2731 2731 $sticky_posts = get_option('sticky_posts'); 2732 2732 if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) { 2733 $sticky_posts = array_slice( $sticky_posts, 0, apply_filters( 'sticky_posts_query_limit', 100 ) ); // sanity limit 2733 2734 $num_posts = count($this->posts); 2734 2735 $sticky_offset = 0; 2736 2735 2737 // Loop over posts and relocate stickies to the front. 2736 2738 for ( $i = 0; $i < $num_posts; $i++ ) { 2737 2739 if ( in_array($this->posts[$i]->ID, $sticky_posts) ) {