Use wp-menu-separator after Settings and before the first plugin top-level. Remove trailing separators. fixes #17629

git-svn-id: https://develop.svn.wordpress.org/trunk@18089 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2011-06-01 14:41:43 +00:00
parent 384371a6f3
commit 2960bcac77
2 changed files with 8 additions and 1 deletions
+7
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.') );