Ticket #9393: 9393-sticky.diff
File 9393-sticky.diff, 639 bytes (added by , 16 years ago) |
---|
-
wp-includes/query.php
2294 2294 2295 2295 // Put sticky posts at the top of the posts array 2296 2296 $sticky_posts = get_option('sticky_posts'); 2297 if ( $this->is_home && $page <= 1 && !empty($sticky_posts) && !$q['caller_get_posts'] ) {2297 if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) { 2298 2298 $num_posts = count($this->posts); 2299 2299 $sticky_offset = 0; 2300 2300 // Loop over posts and relocate stickies to the front.