Menu tweaks. Save menu locations when saving the menu. Also, centralize theme support checks and add them to menu.php. Improve some branching. Remove some old JS vars, add a missing semicolon, etc. props koopersmith. see #13378.

git-svn-id: https://develop.svn.wordpress.org/trunk@14831 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-05-24 09:23:56 +00:00
parent aeca45f369
commit 0aa0cde880
5 changed files with 36 additions and 28 deletions

View File

@@ -149,11 +149,13 @@ $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
if ( current_user_can( 'switch_themes') ) {
$menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
$submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
$submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php');
if ( current_theme_supports( 'nav-menus' ) || current_theme_supports( 'widgets' ) )
$submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php');
} else {
$menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
$submenu['themes.php'][5] = array(__('Themes'), 'edit_theme_options', 'themes.php');
$submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );
if ( current_theme_supports( 'nav-menus' ) || current_theme_supports( 'widgets' ) )
$submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );
}
// Add 'Editor' to the bottom of the Appearence menu.