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


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

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

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

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_about_settings_title', 
        array(
            'label'       => esc_html__( 'About Settings', 'quantic' ),
            'section'     => 'quantic_home_about_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_about_settings_title',
        ) 
    ));

    // About Image 1
    $wp_customize->add_setting(
        'quantic_about_image_big',
        array(
            'default'           => '',
            'sanitize_callback' => 'quantic_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'quantic_about_image_big', 
            array(
                'label'           => sprintf( esc_html__( 'About Big Image', 'quantic' ), ),
                'settings'  => 'quantic_about_image_big',
                'section'   => 'quantic_home_about_settings'
            ) 
        )
    );

    // About Image 2
    $wp_customize->add_setting(
        'quantic_about_image_small',
        array(
            'default'           => '',
            'sanitize_callback' => 'quantic_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'quantic_about_image_small', 
            array(
                'label'           => sprintf( esc_html__( 'About Small Image', 'quantic' ), ),
                'settings'  => 'quantic_about_image_small',
                'section'   => 'quantic_home_about_settings'
            ) 
        )
    );

    // Number
    $wp_customize->add_setting(
        'quantic_about_experience_number',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_experience_number',
        array(
            'label'           => sprintf( esc_html__( 'Experience Number', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_experience_number' ,
            'type'            => 'text',
        )
    );

    // About Short Title
    $wp_customize->add_setting(
        'quantic_about_short_heading',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_short_heading',
        array(
            'label'           => sprintf( esc_html__( 'About Short Heading', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_short_heading' ,
            'type'            => 'text',
        )
    );

    // About Title
    $wp_customize->add_setting(
        'quantic_about_heading',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_heading',
        array(
            'label'           => sprintf( esc_html__( 'About Heading', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_heading' ,
            'type'            => 'text',
        )
    );

    // About Text
    $wp_customize->add_setting(
        'quantic_about_content',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_content',
        array(
            'label'           => sprintf( esc_html__( 'About Text', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_content' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_about_extra_service_settings_title', 
        array(
            'label'       => esc_html__( 'Business Solution', 'quantic' ),
            'section'     => 'quantic_home_about_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_about_extra_service_settings_title',
        ) 
    ));

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

    $wp_customize->add_control(
        'quantic_about_achivement_number',
        array(
            'label'           => sprintf( esc_html__( 'Heading', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_achivement_number' ,
            'type'            => 'text',
        )
    );

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

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

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

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_about_extra_service1_settings_title', 
        array(
            'label'       => esc_html__( 'Business Expert', 'quantic' ),
            'section'     => 'quantic_home_about_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_about_extra_service1_settings_title',
        ) 
    ));

    // Heading
    $wp_customize->add_setting(
        'quantic_about_leading_heading',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_leading_heading',
        array(
            'label'           => sprintf( esc_html__( 'Heading', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_leading_heading' ,
            'type'            => 'text',
        )
    );

    // Text
    $wp_customize->add_setting(
        'quantic_about_leading_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

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

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

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_about_extra_content_settings_title', 
        array(
            'label'       => esc_html__( 'Extra Text', 'quantic' ),
            'section'     => 'quantic_home_about_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_about_extra_content_settings_title',
        ) 
    ));

    // About Text 2
    $wp_customize->add_setting(
        'quantic_about_content2',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'quantic_about_content2',
        array(
            'label'           => sprintf( esc_html__( 'About Text 2', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_content2' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control( 
        new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_about_button_settings_title', 
        array(
            'label'       => esc_html__( 'Button Link', 'quantic' ),
            'section'     => 'quantic_home_about_settings',
            'type'        => 'quantic-title',
            'settings'    => 'quantic_label_about_button_settings_title',
        ) 
    ));

    // About Button Url
    $wp_customize->add_setting(
        'quantic_about_button_link',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

    $wp_customize->add_control(
        'quantic_about_button_link',
        array(
            'label'           => sprintf( esc_html__( 'About Button Link', 'quantic' ), ),
            'section'         => 'quantic_home_about_settings',
            'settings'        => 'quantic_about_button_link' ,
            'type'            => 'url',
        )
    );

}
endif;

add_action( 'customize_register', 'quantic_customizer_home_about_register' );