Comments List Table: include count for "All". Dynamically update.
Fixes #17275. git-svn-id: https://develop.svn.wordpress.org/trunk@34506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d97e9a53b
commit
d7a59c4661
@ -204,7 +204,14 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
//, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
|
||||
//, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
|
||||
$stati = array(
|
||||
'all' => _nx_noop( 'All', 'All', 'comments' ), // singular not used
|
||||
'all' => str_replace( '%s', '<span class="all-count">%s</span>',
|
||||
/* translators: %s: pending comments count */
|
||||
_nx_noop(
|
||||
'All <span class="count">(%s)</span>',
|
||||
'All <span class="count">(%s)</span>',
|
||||
'comments'
|
||||
)
|
||||
), // singular not used
|
||||
'moderated' => str_replace( '%s', '<span class="pending-count">%s</span>',
|
||||
/* translators: %s: pending comments count */
|
||||
_nx_noop(
|
||||
|
@ -435,10 +435,12 @@ setCommentsList = function() {
|
||||
|
||||
if ( pendingDiff ) {
|
||||
updatePending( pendingDiff, commentPostId );
|
||||
updateCountText( 'span.all-count', pendingDiff );
|
||||
}
|
||||
|
||||
if ( approvedDiff ) {
|
||||
updateApproved( approvedDiff, commentPostId );
|
||||
updateCountText( 'span.all-count', approvedDiff );
|
||||
}
|
||||
|
||||
if ( spamDiff ) {
|
||||
|
Loading…
Reference in New Issue
Block a user