Make WordPress Core

Ticket #6010: hide_mod_bubble.diff

File hide_mod_bubble.diff, 1.8 KB (added by filosofo, 18 years ago)
  • wp-admin/wp-admin.css

     
    786786        width: 1em;
    787787}
    788788
     789#adminmenu li a .count-0 {
     790        display: none;
     791}
     792
    789793.post-com-count {
    790794        background-image: url(images/comment-stalk.gif);
    791795        background-repeat: no-repeat;
  • wp-admin/js/edit-comments.js

     
    2121                if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
    2222                        var n = parseInt(a.html(),10) - 1;
    2323                        a.html( n.toString() );
     24                        ( 0 < n ) ? $('#awaiting-mod').each(function() { $(this).show(); $(this).removeClass('count-0') }) : $('#awaiting-mod').hide();
    2425                }
    2526        });
    2627
  • wp-admin/menu.php

     
    1717
    1818$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
    1919$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
    20 $menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod'><span class='comment-count'>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
     20$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');
    2121$menu[30] = array(__('Settings'), 'manage_options', 'options-general.php');
    2222$menu[35] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
    2323if ( current_user_can('edit_users') )