Hide moderation count bubble when no comments are awaiting moderation. Props filosofo. fixes #6010
git-svn-id: https://develop.svn.wordpress.org/trunk@7200 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
052d5a5f72
commit
5c393d7634
@ -33,6 +33,7 @@ var delAfter = function( r, settings ) {
|
||||
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') ) {
|
||||
var n = parseInt(a.html(),10) - 1;
|
||||
a.html( n.toString() );
|
||||
( 0 < n ) ? $('#awaiting-mod').each(function() { $(this).show(); $(this).removeClass('count-0') }) : $('#awaiting-mod').hide();
|
||||
}
|
||||
});
|
||||
$('.post-com-count span.comment-count').each( function() {
|
||||
|
@ -17,7 +17,7 @@ else
|
||||
|
||||
$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
|
||||
$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
|
||||
$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod'><span class='comment-count'>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
|
||||
$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
|
||||
$menu[30] = array(__('Settings'), 'manage_options', 'options-general.php');
|
||||
$menu[35] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
|
||||
if ( current_user_can('edit_users') )
|
||||
|
@ -681,6 +681,10 @@ a.view-comment-post-link {
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
#adminmenu li a .count-0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-com-count {
|
||||
background-repeat: no-repeat;
|
||||
background-position: -240px bottom;
|
||||
|
Loading…
Reference in New Issue
Block a user