From 0210464be1448818b05b4a6990cedb274b494b37 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 29 Aug 2007 18:02:19 +0000 Subject: [PATCH] Limit recent entries query to published posts. fixes #4786 git-svn-id: https://develop.svn.wordpress.org/trunk@5973 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index ae82078ae6..543e9c726f 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -810,7 +810,7 @@ function wp_widget_recent_entries($args) { else if ( $number > 15 ) $number = 15; - $r = new WP_Query("showposts=$number&what_to_show=posts&nopaging=0"); + $r = new WP_Query("showposts=$number&what_to_show=posts&nopaging=0&post_status=publish"); if ($r->have_posts()) : ?>