Ticket #33552: 33552.2.diff
| File 33552.2.diff, 1.7 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/class-wp-customize-manager.php
191 191 require_once( ABSPATH . WPINC . '/class-wp-customize-panel.php' ); 192 192 require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' ); 193 193 require_once( ABSPATH . WPINC . '/class-wp-customize-control.php' ); 194 require_once( ABSPATH . WPINC . '/class-wp-customize-widgets.php' );195 require_once( ABSPATH . WPINC . '/class-wp-customize-nav-menus.php' );196 194 197 $this->widgets = new WP_Customize_Widgets( $this ); 198 $this->nav_menus = new WP_Customize_Nav_Menus( $this ); 195 /** 196 * Filter the core Customizer components to load. 197 * 198 * @since 4.4.0 199 * 200 * @see WP_Customize_Manager::__construct() 201 * 202 * @param array $components List of core components to load. 203 * @param WP_Customize_Manager $this WP_Customize_Manager instance. 204 */ 205 $components = apply_filters( 'customize_components_to_load', array( 'widgets', 'nav_menus' ), $this ); 199 206 207 switch( $components ) { 208 case 'widgets' : 209 require_once( ABSPATH . WPINC . '/class-wp-customize-widgets.php' ); 210 $this->widgets = new WP_Customize_Widgets( $this ); 211 break; 212 case 'nav_menus' : 213 require_once( ABSPATH . WPINC . '/class-wp-customize-nav-menus.php' ); 214 $this->nav_menus = new WP_Customize_Nav_Menus( $this ); 215 break; 216 default : break; 217 } 218 200 219 add_filter( 'wp_die_handler', array( $this, 'wp_die_handler' ) ); 201 220 202 221 add_action( 'setup_theme', array( $this, 'setup_theme' ) );