add_section( 'blog99_top_header_section', array( 'title' => esc_html__( 'Top Header', 'blog99' ), 'panel' =>'blog99_theme_options_panel' ) ); //Disable the Search $wp_customize->add_setting( 'blog99_top_header_disable', array( 'default' => true, 'sanitize_callback' => 'blog99_sanitize_checkbox', 'transport' => 'postMessage', ) ); // Link to Panel: $wp_customize->add_control( new Blog99_Toggle_Control( $wp_customize, 'blog99_top_header_disable', array( 'section' => 'blog99_top_header_section', 'label' => esc_html__( 'Enable Top Header', 'blog99' ), 'description'=> ''.esc_html__('Nav Menu','blog99').'' ) ) ); $wp_customize->selective_refresh->add_partial( 'blog99_top_header_disable', array( 'selector' => '.blog99-header-info ul.header-info', ) ); //top Address $wp_customize->add_setting( 'blog99_top_header_address', array( 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blog99_top_header_address', array( 'label' => esc_html__( 'Address', 'blog99' ), 'section' => 'blog99_top_header_section', 'type' => 'text', ) ); //top Email $wp_customize->add_setting( 'blog99_top_header_email', array( 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blog99_top_header_email', array( 'label' => esc_html__( 'Email', 'blog99' ), 'section' => 'blog99_top_header_section', 'type' => 'text', ) ); //top Phone No $wp_customize->add_setting( 'blog99_top_header_phone_no', array( 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blog99_top_header_phone_no', array( 'label' => esc_html__( 'Phone No', 'blog99' ), 'section' => 'blog99_top_header_section', 'type' => 'text', ) ); //Disable the Search $wp_customize->add_setting( 'blog99_top_menu_links', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new Blog99_Links_Control( $wp_customize, 'blog99_top_menu_links', array( 'section' => 'blog99_top_header_section', 'label' => esc_html__( 'Link', 'blog99' ), ) ) ); } add_action( 'customize_register', 'blog99_customize_register_top_header' );