WordPress.org

Make WordPress Core

Ticket #17275: 17275.2.diff

File 17275.2.diff, 1.8 KB (added by ramiy, 4 years ago)

Show approved-comments before moderated-comments, based on solarissmoke patch

  • class-wp-comments-list-table.php

     
    140140 
    141141                $status_links = array(); 
    142142                $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); 
     143                $num_comments->all = $num_comments->total_comments;     // we use "all" instead of "total_comments" below  
    143144                //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 
    144145                //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>") 
    145146                $stati = array( 
    146                                 'all' => _nx_noop('All', 'All', 'comments'), // singular not used 
     147                                'all' => _nx_noop('All <span class="count">(<span class="all-count">%s</span>)</span>', 'All <span class="count">(<span class="all-count">%s</span>)</span>', 'comments'), // singular not used 
     148                                'approved' => _n_noop('Approved <span class="count">(<span class="approved-count">%s</span>)</span>', 'Approved <span class="count">(<span class="approved-count">%s</span>)</span>'), // singular not used 
    147149                                'moderated' => _n_noop('Pending <span class="count">(<span class="pending-count">%s</span>)</span>', 'Pending <span class="count">(<span class="pending-count">%s</span>)</span>'), 
    148                                 'approved' => _n_noop('Approved', 'Approved'), // singular not used 
    149150                                'spam' => _n_noop('Spam <span class="count">(<span class="spam-count">%s</span>)</span>', 'Spam <span class="count">(<span class="spam-count">%s</span>)</span>'), 
    150151                                'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>') 
    151152                        );