remove_control('header_textcolor'); /* Header Section */ $wp_customize->add_panel( 'header_options', array( 'priority' => 450, 'capability' => 'edit_theme_options', 'title' => __('Header Settings', 'callcenter'), ) ); //Header logo setting $wp_customize->add_section( 'header_logo' , array( 'title' => __('Header Logo setting', 'callcenter'), 'panel' => 'header_options', 'priority' => 400, ) ); $wp_customize->add_setting( 'header_logo_image', array( 'default' => get_template_directory_uri() . '/images/logo.png', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'header_logo_image', array( 'label' => __( 'Upload a 150x150 for Logo Image', 'callcenter' ), 'section' => 'header_logo', 'priority' => 50,) ) ); //Enable/Disable logo text $wp_customize->add_setting('enable_logo_text',array( 'default' => true, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('enable_logo_text', array( 'type' => 'checkbox', 'label' => __('Hide/Show Logo','callcenter'), 'section' => 'header_logo', 'priority' => 100, ) ); //Logo width $wp_customize->add_setting('logo_width', array( 'sanitize_callback' => 'enable_logo_text', 'default' => 200, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('logo_width', array( 'type' => 'text', 'label' => __('Logo Width','callcenter'), 'section' => 'header_logo', 'priority' => 400, ) ); //Logo Height $wp_customize->add_setting( 'logo_height', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 50, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'logo_height', array( 'type' => 'text', 'label' => __('Logo Height','callcenter'), 'section' => 'header_logo', 'priority' =>410, ) ); //Text logo $wp_customize->add_setting( 'enable_header_logo_text',array( 'default' => 'true', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'enable_header_logo_text', array( 'type' => 'checkbox', 'label' => __('Show Logo text','callcenter'), 'section' => 'header_logo', 'priority' => 200, ) ); } add_action( 'customize_register', 'callcenter_header_setting' ); ?>