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
This commit is contained in:
Mark Jaquith 2014-09-29 12:41:49 +00:00
parent 2a050d1e6f
commit 7402030670
1 changed files with 2 additions and 2 deletions

View File

@ -235,8 +235,8 @@ function wp_dashboard_right_now() {
} }
// Comments // Comments
$num_comm = wp_count_comments(); $num_comm = wp_count_comments();
if ( $num_comm && $num_comm->total_comments ) { if ( $num_comm && $num_comm->approved ) {
$text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) ); $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> <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
<?php <?php