public function customize_register() { $changeset =
$this->manager->
unsanitized_post_values();
// Preview settings for nav menus early so that the sections and controls will be added properly.
$nav_menus_setting_ids = array
();
foreach ( array_keys( $changeset ) as $setting_id ) { if ( preg_match( '/^(nav_menu_locations|nav_menu|nav_menu_item)\[/',
$setting_id ) ) { $nav_menus_setting_ids[] =
$setting_id;
} } $settings =
$this->manager->
add_dynamic_settings( $nav_menus_setting_ids );
if ( $this->manager->
settings_previewed() ) { foreach ( $settings as $setting ) { $setting->
preview();
} } // Require JS-rendered control types.
$this->manager->
register_panel_type( 'WP_Customize_Nav_Menus_Panel'
);
$this->manager->
register_control_type( 'WP_Customize_Nav_Menu_Control'
);
$this->manager->
register_control_type( 'WP_Customize_Nav_Menu_Name_Control'
);
$this->manager->
register_control_type( 'WP_Customize_Nav_Menu_Locations_Control'
);
$this->manager->
register_control_type( 'WP_Customize_Nav_Menu_Auto_Add_Control'
);