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:
parent
54511399a8
commit
9f677a0847
|
@ -214,6 +214,13 @@ if ( apply_filters('custom_menu_order', false) ) {
|
||||||
unset($menu_order, $default_menu_order);
|
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() ) {
|
if ( !user_can_access_admin_page() ) {
|
||||||
do_action('admin_page_access_denied');
|
do_action('admin_page_access_denied');
|
||||||
wp_die( __('You do not have sufficient permissions to access this page.') );
|
wp_die( __('You do not have sufficient permissions to access this page.') );
|
||||||
|
|
|
@ -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
|
$_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
|
// Back-compat for old top-levels
|
||||||
$_wp_real_parent_file['post.php'] = 'edit.php';
|
$_wp_real_parent_file['post.php'] = 'edit.php';
|
||||||
|
|
Loading…
Reference in New Issue