From 8d9981927634cdce52c1b8826311a2c2631e7ff2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 1 May 2016 11:05:48 +0000 Subject: [PATCH] Dashboard: Display the comment counts in `wp_dashboard_right_now()` in the rare initial condition when there are 0 approved comments and only pending comments, so the AJAX count update could work. Props afercia. Fixes #35519. git-svn-id: https://develop.svn.wordpress.org/trunk@37335 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index ecd25a01b1..3efc5658e0 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -263,7 +263,7 @@ function wp_dashboard_right_now() { } // Comments $num_comm = wp_count_comments(); - if ( $num_comm && $num_comm->approved ) { + if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) { $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); ?>