summaryrefslogtreecommitdiffstats
path: root/wp-admin/menu.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/menu.php')
-rw-r--r--wp-admin/menu.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 342f1ee..3db528f 100644
--- a/wp-admin/menu.php
+++ b/wp-admin/menu.php
@@ -20,7 +20,8 @@ elseif (strpos($_SERVER['REQUEST_URI'], 'link-add.php') !== false)
else
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
-$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
+$awaiting_mod = wp_count_comments();
+$awaiting_mod = $awaiting_mod->moderated;
$menu[15] = array(__('Design'), 'switch_themes', 'themes.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');
@@ -52,6 +53,7 @@ if ( current_user_can('edit_users') ) {
$submenu['users.php'][5] = array(__('Authors &amp; Users'), 'edit_users', 'users.php');
$submenu['users.php'][10] = array(__('Your Profile'), 'read', 'profile.php');
} else {
+ $_wp_real_parent_file['users.php'] = 'profile.php';
$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
}