From e6fcc1df7c39d9eff302bdc918fae6ca53a48113 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 May 2010 21:44:12 +0000 Subject: [PATCH] Don't show unapproved comments in comments widget. props jshreve, fixes #10615. git-svn-id: https://develop.svn.wordpress.org/trunk@14679 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 4df2e4fc40..f6ed980fb6 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -644,7 +644,7 @@ class WP_Widget_Recent_Comments extends WP_Widget { else if ( $number < 1 ) $number = 1; - $comments = get_comments(array('number' => $number)); + $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) ); $output .= $before_widget; if ( $title ) $output .= $before_title . $title . $after_title;