mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Limit recent entries query to published posts. fixes #4786
git-svn-id: http://svn.automattic.com/wordpress/trunk@5973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a0629e717
commit
ef5caabe37
@ -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()) :
|
||||
?>
|
||||
<?php echo $before_widget; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user