From 5e8db32ede21d186bfc8a65ddae952ec8fcedf9b Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 6 May 2011 20:54:43 +0000 Subject: [PATCH] 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 --- wp-includes/default-widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 81656a425..d9b932a8e 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -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()) : ?>