From 7402030670c26bd246c6c71b2edb5b7c508f25da Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 29 Sep 2014 12:41:49 +0000 Subject: [PATCH] Show the number of approved comments instead of all comments on the dashboard in the "At a glance" section. fixes #26738. props benjmay git-svn-id: https://develop.svn.wordpress.org/trunk@29785 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 2a5e74bea4..6e6afb2595 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -235,8 +235,8 @@ function wp_dashboard_right_now() { } // Comments $num_comm = wp_count_comments(); - if ( $num_comm && $num_comm->total_comments ) { - $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) ); + if ( $num_comm && $num_comm->approved ) { + $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); ?>