From cf9f85dc8121a359d550ffa3b735fb48859eee88 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 24 Apr 2008 11:45:39 +0000 Subject: Merged with WP 2.5, revision 7806 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/menu.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wp-admin/menu.php') 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'), "$awaiting_mod" ), '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 & 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'); } -- cgit