remove_section( 'colors' ); $wp_customize->remove_section( 'header_image' ); $wp_customize->remove_section( 'background_image' ); $wp_customize->remove_section( 'static_front_page' ); $wp_customize->remove_section('themes'); $wp_customize->get_section('title_tagline')->priority = 10; } add_action( 'customize_controls_print_styles', 'whistle_enqueue_customizer_stylesheet' ); function whistle_enqueue_customizer_stylesheet() { wp_register_style( 'whistle-customizer-css', WHISTLE_THEME_URI.'/kirki/assets/css/customizer.css', NULL, NULL, 'all' ); wp_enqueue_style( 'whistle-customizer-css' ); } add_action( 'customize_controls_print_footer_scripts', 'whistle_enqueue_customizer_script' ); function whistle_enqueue_customizer_script() { wp_register_script( 'whistle-customizer-js', WHISTLE_THEME_URI.'/kirki/assets/js/customizer.js', array('jquery', 'customize-controls' ), false, true ); wp_enqueue_script( 'whistle-customizer-js' ); } # Theme Customizer Begins WHISTLE_Kirki::add_config( $config , array( 'capability' => 'edit_theme_options', 'option_type' => 'theme_mod', ) ); # Site Identity # use-custom-logo WHISTLE_Kirki::add_field( $config, array( 'type' => 'switch', 'settings' => 'use-custom-logo', 'label' => esc_html__( 'Logo ?', 'whistle' ), 'section' => 'title_tagline', 'priority' => 1, 'default' => whistle_defaults('use-custom-logo'), 'description' => esc_html__('Switch to Site title or Logo','whistle'), 'choices' => array( 'on' => esc_attr__( 'Logo', 'whistle' ), 'off' => esc_attr__( 'Site Title', 'whistle' ) ) ) ); # custom-logo WHISTLE_Kirki::add_field( $config, array( 'type' => 'image', 'settings' => 'custom-logo', 'label' => esc_html__( 'Logo', 'whistle' ), 'section' => 'title_tagline', 'priority' => 2, 'default' => whistle_defaults( 'custom-logo' ), 'active_callback' => array( array( 'setting' => 'use-custom-logo', 'operator' => '==', 'value' => '1' ) ) )); # site-title-color WHISTLE_Kirki::add_field( $config, array( 'type' => 'color', 'settings' => 'custom-title-color', 'label' => esc_html__( 'Site Title Color', 'whistle' ), 'section' => 'title_tagline', 'priority' => 4, 'active_callback' => array( array( 'setting' => 'use-custom-logo', 'operator' => '!=', 'value' => '1' ) ), 'output' => array( array( 'element' => '#site-title a' , 'property' => 'color', 'suffix' => ' !important' ) ), 'choices' => array( 'alpha' => true ), ) ); # custom-light-logo WHISTLE_Kirki::add_field( $config, array( 'type' => 'image', 'settings' => 'custom-light-logo', 'label' => esc_html__( 'Light Logo', 'whistle' ), 'section' => 'title_tagline', 'priority' => 3, 'default' => whistle_defaults( 'custom-light-logo' ), 'active_callback' => array( array( 'setting' => 'use-custom-logo', 'operator' => '==', 'value' => '1' ) ) )); # Site Layout require_once get_template_directory() . '/kirki/options/site-layout.php'; # Site Skin require_once get_template_directory() . '/kirki/options/site-skin.php'; # Additional JS require_once get_template_directory() . '/kirki/options/custom-js.php'; # Typography WHISTLE_Kirki::add_panel( 'dt_site_typography_panel', array( 'title' => esc_html__( 'Typography', 'whistle' ), 'description' => esc_html__('Typography Settings','whistle'), 'priority' => 220 ) ); require_once get_template_directory() . '/kirki/options/site-typography.php'; # Theme Customizer Ends