WordPress.org

Make WordPress Core

Ticket #26738: dashboard.diff

File dashboard.diff, 734 bytes (added by benjmay, 8 years ago)

Change to use approved count, rather than total

  • wp-admin/includes/dashboard.php

     
    199199        }
    200200        // Comments
    201201        $num_comm = wp_count_comments();
    202         if ( $num_comm && $num_comm->total_comments ) {
    203                 $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) );
     202        if ( $num_comm && $num_comm->approved ) {
     203                $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
    204204                ?>
    205205                <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
    206206                <?php