Sort the menu before adding classes. see #7966

git-svn-id: http://svn.automattic.com/wordpress/trunk@9580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-09 19:20:38 +00:00
parent 50b407dc4b
commit b10351e5c6
2 changed files with 4 additions and 4 deletions

View File

@ -570,11 +570,11 @@ function add_object_page( $page_title, $menu_title, $access_level, $file, $funct
if ( empty($icon_url) )
$icon_url = 'images/menu/generic.png';
$menu[$_wp_last_object_menu][4] = ''; // Remove menu-top-last
//$menu[$_wp_last_object_menu][4] = ''; // Remove menu-top-last
$_wp_last_object_menu++;
$menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top-last ' . $hookname, $hookname, $icon_url );
$menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
return $hookname;
}

View File

@ -220,10 +220,10 @@ function add_menu_classes($menu) {
return apply_filters( 'add_menu_classes', $menu );
}
$menu = add_menu_classes($menu);
uksort($menu, "strnatcasecmp"); // make it all pretty
$menu = add_menu_classes($menu);
if (! user_can_access_admin_page()) {
do_action('admin_page_access_denied');
wp_die( __('You do not have sufficient permissions to access this page.') );