Make WordPress Core

Changeset 7200


Ignore:
Timestamp:
03/10/2008 05:54:46 AM (18 years ago)
Author:
ryan
Message:

Hide moderation count bubble when no comments are awaiting moderation. Props filosofo. fixes #6010

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/edit-comments.js

    r7153 r7200  
    3434            var n = parseInt(a.html(),10) - 1;
    3535            a.html( n.toString() );
     36            ( 0 < n ) ? $('#awaiting-mod').each(function() { $(this).show(); $(this).removeClass('count-0') }) : $('#awaiting-mod').hide();
    3637        }
    3738    });
  • trunk/wp-admin/menu.php

    r7050 r7200  
    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');
  • trunk/wp-admin/wp-admin.css

    r7195 r7200  
    680680    height: 0.9em;
    681681    width: 1em;
     682}
     683
     684#adminmenu li a .count-0 {
     685    display: none;
    682686}
    683687
Note: See TracChangeset for help on using the changeset viewer.