WordPress.org

Make WordPress Core

Ticket #17933: all_counter.diff

File all_counter.diff, 1.8 KB (added by CoenJacobs, 3 years ago)

Added counter to the 'All' and 'Approved' status link (FIXED VERSION)

  • 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->moderated + $num_comments->approved; 
    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 
    147148                                '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 
     149                                '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 
    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                        );