diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index e37d3fb73c..c02c31d719 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -2,17 +2,21 @@ var list; var extra; jQuery(function($) { var dimAfter = function( r, settings ) { - var a = $('#awaitmod'); - var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ); - a.html( n.toString() ); + $('.comment-count').each( function() { + var a = $('#' + this.id ); + var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ); + a.html( n.toString() ); + }); } var delAfter = function( r, settings ) { - var a = $('#awaitmod'); - if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) { - var n = parseInt(a.html(),10) - 1; - a.html( n.toString() ); - } + $('.comment-count').each( function() { + var a = $('#' + this.id ); + if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) { + var n = parseInt(a.html(),10) - 1; + a.html( n.toString() ); + } + }); if ( extra.size() == 0 || extra.children().size() == 0 ) { return; diff --git a/wp-admin/menu.php b/wp-admin/menu.php index e1b5eb1129..6002c1c6c9 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -18,7 +18,7 @@ else $awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); if ( 100 < $awaiting_mod ) $awaiting_mod = '99+'; // to not blow out layout -$menu[15] = array( sprintf( __('Comments %s'), "$awaiting_mod" ), 'edit_posts', 'edit-comments.php'); +$menu[15] = array( sprintf( __('Comments %s'), "$awaiting_mod" ), 'edit_posts', 'edit-comments.php'); $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php'); $menu[25] = array(__('Design'), 'switch_themes', 'themes.php'); $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); @@ -35,7 +35,7 @@ $submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.p $submenu['edit-comments.php'][5] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); $awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); -$submenu['edit-comments.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "$awaiting_mod"), 'edit_posts', 'moderation.php'); +$submenu['edit-comments.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "$awaiting_mod"), 'edit_posts', 'moderation.php'); $submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');