Comment bubble count fix from nbachiyski. fixes #5694
git-svn-id: http://svn.automattic.com/wordpress/trunk@6678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b26cf6d97d
commit
1aef57fb18
|
@ -2,7 +2,7 @@ var list; var extra;
|
|||
jQuery(function($) {
|
||||
|
||||
var dimAfter = function( r, settings ) {
|
||||
$('.comment-count').each( function() {
|
||||
$('.comment-count span').each( function() {
|
||||
var a = $(this);
|
||||
var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
|
||||
a.html( n.toString() );
|
||||
|
@ -16,7 +16,7 @@ var dimAfter = function( r, settings ) {
|
|||
}
|
||||
|
||||
var delAfter = function( r, settings ) {
|
||||
$('.comment-count').each( function() {
|
||||
$('.comment-count span').each( function() {
|
||||
var a = $(this);
|
||||
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
|
||||
var n = parseInt(a.html(),10) - 1;
|
||||
|
|
|
@ -33,7 +33,7 @@ $submenu['post-new.php'][15] = array(__('Link'), 'manage_links', 'link-add.php')
|
|||
|
||||
$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)"), "<span id='awaitmod' class='comment-count'>$awaiting_mod</span>"), 'edit_posts', 'moderation.php');
|
||||
$submenu['edit-comments.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "<span id='awaitmod' class='comment-count'><span>$awaiting_mod</span></span>"), 'edit_posts', 'moderation.php');
|
||||
|
||||
|
||||
$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');
|
||||
|
|
Loading…
Reference in New Issue