WordPress.org

Make WordPress Core

Changeset 37335


Ignore:
Timestamp:
05/01/2016 11:05:48 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r37302 r37335  
    264264    // Comments
    265265    $num_comm = wp_count_comments();
    266     if ( $num_comm && $num_comm->approved ) {
     266    if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) {
    267267        $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
    268268        ?>
Note: See TracChangeset for help on using the changeset viewer.