From 868ff9bcfae1a2b58a1b109d33bf64d44d006e5c Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@17825 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 81656a425e..d9b932a8e1 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()) : ?>