From 9f677a084793bfee21b87da972e4c53f34ee6aa3 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 1 Jun 2011 14:41:43 +0000 Subject: [PATCH] Use wp-menu-separator after Settings and before the first plugin top-level. Remove trailing separators. fixes #17629 git-svn-id: http://svn.automattic.com/wordpress/trunk@18089 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/menu.php | 7 +++++++ wp-admin/menu.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php index 40c4fb1cee..a3ed33d8aa 100644 --- a/wp-admin/includes/menu.php +++ b/wp-admin/includes/menu.php @@ -214,6 +214,13 @@ if ( apply_filters('custom_menu_order', false) ) { unset($menu_order, $default_menu_order); } +// Remove the last menu item if it is a separator. +$last_menu_item = end( $menu ); +if ( 'wp-menu-separator' == $last_menu_item[ 4 ] ) + array_pop( $menu ); +reset( $menu ); +unset( $last_menu_item ); + if ( !user_can_access_admin_page() ) { do_action('admin_page_access_denied'); wp_die( __('You do not have sufficient permissions to access this page.') ); diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 3c044f0e4f..b90fb3895b 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -234,7 +234,7 @@ $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group -$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); +$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' ); // Back-compat for old top-levels $_wp_real_parent_file['post.php'] = 'edit.php';