<?php
function expert_dental_specialist_upper_header_settings( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	/*=========================================
	top header
	=========================================*/
	$wp_customize->add_section(
        'expert_dental_specialist_topbar',
        array(
        	'priority'      => 2,
            'title' 		=> __('Header Informations','expert-dental-specialist'),
			'panel'  		=> 'expert_dental_specialist_frontpage_sections',
		)
    );

    $wp_customize->add_setting( 
		'expert_dental_specialist_topbar' , 
			array(
			'default' => true,
			'sanitize_callback' => 'expert_dental_specialist_sanitize_checkbox',
			'capability' => 'edit_theme_options',
		) 
	);
	$wp_customize->add_control(
	'expert_dental_specialist_topbar', 
		array(
			'label'	      => esc_html__( 'Show / Hide Topbar', 'expert-dental-specialist' ),
			'section'     => 'expert_dental_specialist_topbar',
			'settings'    => 'expert_dental_specialist_topbar',
			'type'        => 'checkbox'
		) 
	);

	$wp_customize->add_setting('expert_dental_specialist_message_text',array(
		'default'=> 'We understand that each patient is unique',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_dental_specialist_message_text',array(
		'label'	=> __('Add Topbar Text','expert-dental-specialist'),
		'section'=> 'expert_dental_specialist_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_dental_specialist_time',array(
		'default'=> 'Monday - Friday: 08:00 - 22:00',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_dental_specialist_time',array(
		'label'	=> __('Add Timing','expert-dental-specialist'),
		'section'=> 'expert_dental_specialist_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_dental_specialist_call',array(
		'default'=> 'Class U: 1234 5678 910',
		'sanitize_callback'	=> 'expert_dental_specialist_sanitize_phone_number'
	));
	$wp_customize->add_control('expert_dental_specialist_call',array(
		'label'	=> __('Add Phone Number','expert-dental-specialist'),
		'section'=> 'expert_dental_specialist_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting( 'expert_dental_specialist_upgrade_page_settings_156454',
        array(
            'sanitize_callback' => 'sanitize_text_field'
        )
    );
    $wp_customize->add_control( new Expert_Dental_Specialist_Control_Upgrade(
        $wp_customize, 'expert_dental_specialist_upgrade_page_settings_156454',
            array(
                'priority'      => 200,
                'section'       => 'expert_dental_specialist_topbar',
                'settings'      => 'expert_dental_specialist_upgrade_page_settings_156454',
                'label'         => __( 'Expert Dental Specialist Pro comes with additional features.', 'expert-dental-specialist' ),
                'choices'       => array( __( '15+ Ready-Made Sections', 'expert-dental-specialist' ), __( 'One-Click Demo Import', 'expert-dental-specialist' ), __( 'WooCommerce Integrated', 'expert-dental-specialist' ), __( 'Drag & Drop Section Reordering', 'expert-dental-specialist' ),__( 'Advanced Typography Control', 'expert-dental-specialist' ),__( 'Intuitive Customization Options', 'expert-dental-specialist' ),__( '24/7 Support', 'expert-dental-specialist' ), )
            )
        )
    );

}
add_action( 'customize_register', 'expert_dental_specialist_upper_header_settings' );