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
This commit is contained in:
Sergey Biryukov 2016-05-01 11:05:48 +00:00
parent 74fc4c6603
commit 8d99819276

View File

@ -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 ) );
?>
<li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>