GC_Customize_Manager::gc_loaded()
最后更新于:2021-11-27 02:48:16
GC_Customize_Manager::gc_loaded()Register styles/scripts and initialize the preview of each setting
源文件
文件: gc-includes/class-gc-customize-manager.php
public function gc_loaded() {
// Unconditionally register core types for panels, sections, and controls
// in case plugin unhooks all customize_register actions.
$this->register_panel_type( 'GC_Customize_Panel' );
$this->register_panel_type( 'GC_Customize_Themes_Panel' );
$this->register_section_type( 'GC_Customize_Section' );
$this->register_section_type( 'GC_Customize_Sidebar_Section' );
$this->register_section_type( 'GC_Customize_Themes_Section' );
$this->register_control_type( 'GC_Customize_Color_Control' );
$this->register_control_type( 'GC_Customize_Media_Control' );
$this->register_control_type( 'GC_Customize_Upload_Control' );
$this->register_control_type( 'GC_Customize_Image_Control' );
$this->register_control_type( 'GC_Customize_Background_Image_Control' );
$this->register_control_type( 'GC_Customize_Background_Position_Control' );
$this->register_control_type( 'GC_Customize_Cropped_Image_Control' );
$this->register_control_type( 'GC_Customize_Site_Icon_Control' );
$this->register_control_type( 'GC_Customize_Theme_Control' );
$this->register_control_type( 'GC_Customize_Code_Editor_Control' );
$this->register_control_type( 'GC_Customize_Date_Time_Control' );
/**
* Fires once GeChiUI has loaded, allowing scripts and styles to be initialized.
*
* @since 3.4.0
*
* @param GC_Customize_Manager $this GC_Customize_Manager instance.
*/
do_action( 'customize_register', $this );
if ( $this->settings_previewed() ) {
foreach ( $this->settings as $setting ) {
$setting->preview();
}
}
if ( $this->is_preview() && ! is_admin() ) {
$this->customize_preview_init();
}
}