diff --git wp-admin/includes/class-wp-comments-list-table.php wp-admin/includes/class-wp-comments-list-table.php
index 16b5106..06a2286 100644
|
|
|
class WP_Comments_List_Table extends WP_List_Table { |
| 360 | 360 | <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div> |
| 361 | 361 | <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div> |
| 362 | 362 | <div class="comment_status"><?php echo $comment->comment_approved; ?></div> |
| | 363 | <div class="post-id"><?php echo $post->ID; ?></div> |
| 363 | 364 | </div> |
| 364 | 365 | <?php |
| 365 | 366 | } |
diff --git wp-admin/includes/class-wp-list-table.php wp-admin/includes/class-wp-list-table.php
index a8aaa8f..13774a6 100644
|
|
|
class WP_List_Table { |
| 413 | 413 | if ( $pending_comments ) |
| 414 | 414 | echo '<strong>'; |
| 415 | 415 | |
| 416 | | $link = "<a href='" . add_query_arg( 'p', $post_id, admin_url('edit-comments.php') ) . "' title='$pending_phrase' class='post-com-count'><span class='comment-count'>%s</span></a>"; |
| | 416 | $link = "<a href='" . add_query_arg( 'p', $post_id, admin_url('edit-comments.php') ) . "' title='$pending_phrase' class='post-com-count'><span class='comment-count for-post-" . $post_id . "'>%s</span></a>"; |
| 417 | 417 | |
| 418 | 418 | comments_number( |
| 419 | 419 | sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ), |
diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
index 177dc86..9b8c1f3 100644
|
|
|
setCommentsList = function() { |
| 9 | 9 | pageInput = $('.tablenav input[name="_page"]', '#comments-form'); |
| 10 | 10 | |
| 11 | 11 | dimAfter = function( r, settings ) { |
| 12 | | var c = $('#' + settings.element); |
| | 12 | var c = $('#' + settings.element), |
| | 13 | post_id = c.find('.post-id').text(), |
| | 14 | dif = c.is('.' + settings.dimClass) ? -1 : 1, |
| | 15 | bubble = $('span.comment-count.for-post-' + post_id), |
| | 16 | bubble_count = bubble.eq(0).text() * 1; |
| 13 | 17 | |
| 14 | 18 | if ( c.is('.unapproved') ) |
| 15 | 19 | c.find('div.comment_status').html('0') |
| … |
… |
setCommentsList = function() { |
| 17 | 21 | c.find('div.comment_status').html('1') |
| 18 | 22 | |
| 19 | 23 | $('span.pending-count').each( function() { |
| 20 | | var a = $(this), n, dif; |
| | 24 | var a = $(this), n; |
| 21 | 25 | n = a.html().replace(/[^0-9]+/g, ''); |
| 22 | 26 | n = parseInt(n,10); |
| 23 | 27 | if ( isNaN(n) ) return; |
| 24 | | dif = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1; |
| 25 | | n = n + dif; |
| | 28 | n = n - dif; |
| 26 | 29 | if ( n < 0 ) { n = 0; } |
| 27 | 30 | a.closest('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0'); |
| 28 | 31 | updateCount(a, n); |
| 29 | 32 | dashboardTotals(); |
| 30 | 33 | }); |
| | 34 | |
| | 35 | bubble_count += dif; |
| | 36 | bubble.text(bubble_count); |
| 31 | 37 | }; |
| 32 | 38 | |
| 33 | 39 | // Send current total, page, per_page and url |