Pass no_found_rows to query in recent posts widget. Props scribu. fixes #17203
git-svn-id: http://svn.automattic.com/wordpress/trunk@17825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
edfc0fce3d
commit
5e8db32ede
|
@ -537,7 +537,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
|
|||
if ( ! $number = absint( $instance['number'] ) )
|
||||
$number = 10;
|
||||
|
||||
$r = new WP_Query(array('posts_per_page' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => true));
|
||||
$r = new WP_Query(array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true));
|
||||
if ($r->have_posts()) :
|
||||
?>
|
||||
<?php echo $before_widget; ?>
|
||||
|
|
Loading…
Reference in New Issue