diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index c58bbad0f1..f2bf8f82b5 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -35,6 +35,8 @@ var delAfter = function( r, settings ) { var n = parseInt(a.html(),10); if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment n = n - 1; + } else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove" + n = n + 1; } if ( n < 0 ) { n = 0; } a.html( n.toString() ); diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js index e0c5b25a56..f1eed16dbf 100644 --- a/wp-includes/js/wp-lists.js +++ b/wp-includes/js/wp-lists.js @@ -36,7 +36,8 @@ var wpList = { var bg; var r; s = $.extend( {}, this.wpList.settings, { element: null, - nonce: 0 + nonce: 0, + target: e.get(0) }, s || {} ); if ( $.isFunction( s.confirm ) ) { if ( 'add' != a ) {