Make WordPress Core


Ignore:
Timestamp:
05/24/2010 09:23:56 AM (16 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r14713 r14831  
    150150        $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
    151151                $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
    152                 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php');
     152                if ( current_theme_supports( 'nav-menus' ) || current_theme_supports( 'widgets' ) )
     153                        $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php');
    153154} else {
    154155        $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
    155156                $submenu['themes.php'][5]  = array(__('Themes'), 'edit_theme_options', 'themes.php');
    156                 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );
     157                if ( current_theme_supports( 'nav-menus' ) || current_theme_supports( 'widgets' ) )
     158                        $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );
    157159}
    158160
Note: See TracChangeset for help on using the changeset viewer.