WordPress.org

Make WordPress Core

Ticket #21413: add_customizer_to_menu.patch

File add_customizer_to_menu.patch, 1.2 KB (added by ryanhellyer, 21 months ago)

Adds customizer link at beginning of Appearances menu in WordPress

  • wp-admin/menu.php

     
    131131 
    132132if ( current_user_can( 'switch_themes') ) { 
    133133        $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); 
     134                $submenu['themes.php'][4] = array(__( 'Customize' ), 'edit_theme_options', 'customizer.php' ); 
    134135                $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php'); 
    135136                if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) 
    136137                        $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php'); 
    137138} else { 
    138139        $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); 
     140                $submenu['themes.php'][4] = array(__( 'Customize' ), 'edit_theme_options', 'customizer.php' ); 
    139141                $submenu['themes.php'][5]  = array(__('Themes'), 'edit_theme_options', 'themes.php'); 
    140142                if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) 
    141143                        $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );