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
This commit is contained in:
ryan 2011-06-01 14:41:43 +00:00
parent 54511399a8
commit 9f677a0847
2 changed files with 8 additions and 1 deletions

View File

@ -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.') );

View File

@ -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';