Astra_Customizer::__construct()
Constructor
Description
Source
File: inc/customizer/class-astra-customizer.php
public function __construct() {
/**
* Customizer
*/
add_action( 'customize_preview_init', array( $this, 'preview_init' ) );
if ( is_admin() || is_customize_preview() ) {
add_action( 'customize_register', array( $this, 'include_configurations' ), 2 );
add_action( 'customize_register', array( $this, 'prepare_customizer_javascript_configs' ) );
add_action( 'customize_register', array( $this, 'astra_pro_upgrade_configurations' ), 2 );
add_action( 'customize_register', array( $this, 'prepare_group_configs' ), 9 );
add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 );
add_filter( 'customize_dynamic_partial_args', array( $this, 'filter_dynamic_partial_args' ), 10, 2 );
}
// Disable block editor for widgets in the customizer.
if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '10.6.2', '>' ) && is_customize_preview() ) {
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
}
add_action( 'customize_controls_enqueue_scripts', array( $this, 'controls_scripts' ) );
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_customizer_scripts' ), 999 );
add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_footer_scripts' ) );
add_action( 'customize_register', array( $this, 'customize_register_panel' ), 2 );
add_action( 'customize_register', array( $this, 'customize_register' ) );
add_action( 'customize_register', array( $this, 'customize_register_site_icon' ), 20 );
add_action( 'customize_save_after', array( $this, 'customize_save' ) );
add_action( 'customize_save_after', array( $this, 'delete_cached_partials' ) );
add_action( 'wp_head', array( $this, 'preview_styles' ) );
add_action( 'wp_ajax_astra_regenerate_fonts_folder', array( $this, 'regenerate_astra_fonts_folder' ) );
}
Expand full source code Collapse full source code View on Trac