Allow retrieving comments by post type, status, author, author, name, or parent. Fetch only published posts for recent comments widget. Props filosofo. fixes #16506 #12904
git-svn-id: http://svn.automattic.com/wordpress/trunk@17667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -640,7 +640,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
|
||||
if ( ! $number = absint( $instance['number'] ) )
|
||||
$number = 5;
|
||||
|
||||
$comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) );
|
||||
$comments = get_comments( array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish' ) );
|
||||
$output .= $before_widget;
|
||||
if ( $title )
|
||||
$output .= $before_title . $title . $after_title;
|
||||
|
||||
Reference in New Issue
Block a user