Make WordPress Core

Changeset 29785


Ignore:
Timestamp:
09/29/2014 12:41:49 PM (9 years ago)
Author:
markjaquith
Message:

Show the number of approved comments instead of all comments on
the dashboard in the "At a glance" section.

fixes #26738. props benjmay

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r29442 r29785  
    236236    // Comments
    237237    $num_comm = wp_count_comments();
    238     if ( $num_comm && $num_comm->total_comments ) {
    239         $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) );
     238    if ( $num_comm && $num_comm->approved ) {
     239        $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
    240240        ?>
    241241        <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
Note: See TracChangeset for help on using the changeset viewer.