From 28bf9727896a680969769f764fd4fde22dd45469 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 29 Sep 2014 12:42:16 +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 Built from https://develop.svn.wordpress.org/trunk@29785 git-svn-id: http://core.svn.wordpress.org/trunk@29557 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 2a5e74bea4..6e6afb2595 100644 --- a/wp-admin/includes/dashboard.php +++ b/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 ) ); ?>