From dc5815146e1a42523445267317a7d8c4ecc21dd4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 1 May 2016 11:06:28 +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. Built from https://develop.svn.wordpress.org/trunk@37335 git-svn-id: http://core.svn.wordpress.org/trunk@37301 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index ecd25a01b1..3efc5658e0 100644 --- a/wp-admin/includes/dashboard.php +++ b/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 ) ); ?>
  • diff --git a/wp-includes/version.php b/wp-includes/version.php index 3214e954f9..9aacea042e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37334'; +$wp_version = '4.6-alpha-37335'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.