From 448bd4fb7bfe23c83bfb49cb48461a4592da9f4e Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 17 Nov 2006 16:22:46 +0000 Subject: [PATCH] Create a new comments top-level menu and move things under it git-svn-id: http://svn.automattic.com/wordpress/trunk@4474 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-comments.php | 2 +- wp-admin/menu.php | 11 +++++++---- wp-admin/moderation.php | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 6227ef786..e1c714620 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -2,7 +2,7 @@ require_once('admin.php'); $title = __('Edit Comments'); -$parent_file = 'edit.php'; +$parent_file = 'edit-comments.php'; wp_enqueue_script( 'admin-comments' ); require_once('admin-header.php'); diff --git a/wp-admin/menu.php b/wp-admin/menu.php index b4ebf165c..2ead8eddb 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -14,7 +14,8 @@ if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') ) $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); else $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); - + +$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php'); $menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); @@ -28,13 +29,15 @@ $menu[40] = array(__('Options'), 'manage_options', 'options-general.php'); $submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php'); $submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php'); +$submenu['edit-comments.php'][5] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); +$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); +$submenu['edit-comments.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "$awaiting_mod"), 'edit_posts', 'moderation.php'); + + $submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php'); $submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php'); $submenu['edit.php'][12] = array(__('Uploads'), 'upload_files', 'upload.php'); $submenu['edit.php'][15] = array(__('Categories'), 'manage_categories', 'categories.php'); -$submenu['edit.php'][20] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); -$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); -$submenu['edit.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "$awaiting_mod"), 'edit_posts', 'moderation.php'); $submenu['edit.php'][30] = array(__('Files'), 'edit_files', 'templates.php'); $submenu['edit.php'][35] = array(__('Import'), 'import', 'import.php'); $submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php'); diff --git a/wp-admin/moderation.php b/wp-admin/moderation.php index b9e3f0625..8017073d4 100644 --- a/wp-admin/moderation.php +++ b/wp-admin/moderation.php @@ -2,7 +2,7 @@ require_once('admin.php'); $title = __('Moderate comments'); -$parent_file = 'edit.php'; +$parent_file = 'edit-comments.php'; wp_enqueue_script( 'admin-comments' ); wp_reset_vars(array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky'));