<?php
/**
 * Theme Customizer Controls
 *
 * @package Quantic
 */


if ( ! function_exists( 'quantic_customizer_header_register' ) ) :
function quantic_customizer_header_register( $wp_customize ) {

    $wp_customize->add_section(
        'quantic_home_header_settings',
        array (
            'priority'      => 25,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Header Settings', 'quantic' )
        )
    );

    // Title label
    $wp_customize->add_setting( 
        'quantic_label_header_settings_title', 
        array(
            'sanitize_callback' => 'quantic_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_header_settings_title', 
        array(
            'label'       => esc_html__( 'Header Settings', 'quantic' ),
            'section'     => 'quantic_home_header_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_header_settings_title',
        ) 
    ));

    $wp_customize->add_setting(
        'quantic_header_calling_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_header_calling_text',
        array(
            'label'           => sprintf( esc_html__( 'Calling Text', 'quantic' ), ),
            'section'         => 'quantic_home_header_settings',
            'settings'        => 'quantic_header_calling_text' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'quantic_header_calling_number',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_header_calling_number',
        array(
            'label'           => sprintf( esc_html__( 'Calling Number', 'quantic' ), ),
            'section'         => 'quantic_home_header_settings',
            'settings'        => 'quantic_header_calling_number' ,
            'type'            => 'text',
        )
    );

}
endif;

add_action( 'customize_register', 'quantic_customizer_header_register' );