<?php
/**
 * Theme Customizer Controls
 *
 * @package Lawyer Consultant
 */


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

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

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

    $wp_customize->add_control( 
        new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_about_settings_title', 
        array(
            'label'       => esc_html__( 'About Settings', 'lawyer-consultant' ),
            'section'     => 'lawyer_consultant_home_about_settings',
            'type'        => 'lawyer-consultant-title',
            'settings'    => 'lawyer_consultant_label_about_settings_title',
        ) 
    ));

    // About Image 1
    $wp_customize->add_setting(
        'lawyer_consultant_about_image',
        array(
            'default'           => '',
            'sanitize_callback' => 'lawyer_consultant_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'lawyer_consultant_about_image', 
            array(
                'label'           => sprintf( esc_html__( 'About Image', 'lawyer-consultant' ), ),
                'settings'  => 'lawyer_consultant_about_image',
                'section'   => 'lawyer_consultant_home_about_settings'
            ) 
        )
    );

    // Title Label
    $wp_customize->add_setting( 
        'lawyer_consultant_label_project_settings_1', 
        array(
            'sanitize_callback' => 'lawyer_consultant_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_project_settings_1', 
        array(
            'label'       => esc_html__( 'Services Settings 1', 'lawyer-consultant' ),
            'section'     => 'lawyer_consultant_home_about_settings',
            'type'        => 'lawyer-consultant-title',
            'settings'    => 'lawyer_consultant_label_project_settings_1',
        ) 
    ));

    // About Image 1
    $wp_customize->add_setting(
        'lawyer_consultant_about_image1',
        array(
            'default'           => '',
            'sanitize_callback' => 'lawyer_consultant_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'lawyer_consultant_about_image1', 
            array(
                'label'           => sprintf( esc_html__( 'Image 1', 'lawyer-consultant' ), ),
                'settings'  => 'lawyer_consultant_about_image1',
                'section'   => 'lawyer_consultant_home_about_settings'
            ) 
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_heading1',
        array(
            'label'           => sprintf( esc_html__( 'Heading 1', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_heading1' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_content1',
        array(
            'label'           => sprintf( esc_html__( 'Text 1', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_content1' ,
            'type'            => 'text',
        )
    );

    // Price 1
    $wp_customize->add_setting(
        'lawyer_consultant_about_price1',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'lawyer_consultant_about_price1',
        array(
            'label'           => sprintf( esc_html__( 'Price 1', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_price1' ,
            'type'            => 'text',
        )
    );

    // Title Label
    $wp_customize->add_setting( 
        'lawyer_consultant_label_project_settings_2', 
        array(
            'sanitize_callback' => 'lawyer_consultant_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_project_settings_2', 
        array(
            'label'       => esc_html__( 'Services Settings 2', 'lawyer-consultant' ),
            'section'     => 'lawyer_consultant_home_about_settings',
            'type'        => 'lawyer-consultant-title',
            'settings'    => 'lawyer_consultant_label_project_settings_2',
        ) 
    ));

    // About Image 2
    $wp_customize->add_setting(
        'lawyer_consultant_about_image2',
        array(
            'default'           => '',
            'sanitize_callback' => 'lawyer_consultant_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'lawyer_consultant_about_image2', 
            array(
                'label'           => sprintf( esc_html__( 'Image 2', 'lawyer-consultant' ), ),
                'settings'  => 'lawyer_consultant_about_image2',
                'section'   => 'lawyer_consultant_home_about_settings'
            ) 
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_heading2',
        array(
            'label'           => sprintf( esc_html__( 'Heading 2', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_heading2' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_content2',
        array(
            'label'           => sprintf( esc_html__( 'Text 2', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_content2' ,
            'type'            => 'text',
        )
    );

    // Price 2
    $wp_customize->add_setting(
        'lawyer_consultant_about_price2',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'lawyer_consultant_about_price2',
        array(
            'label'           => sprintf( esc_html__( 'Price 2', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_price2' ,
            'type'            => 'text',
        )
    );

    // Title Label
    $wp_customize->add_setting( 
        'lawyer_consultant_label_project_settings_3', 
        array(
            'sanitize_callback' => 'lawyer_consultant_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_project_settings_3', 
        array(
            'label'       => esc_html__( 'Services Settings 3', 'lawyer-consultant' ),
            'section'     => 'lawyer_consultant_home_about_settings',
            'type'        => 'lawyer-consultant-title',
            'settings'    => 'lawyer_consultant_label_project_settings_3',
        ) 
    ));

    // About Image 3
    $wp_customize->add_setting(
        'lawyer_consultant_about_image3',
        array(
            'default'           => '',
            'sanitize_callback' => 'lawyer_consultant_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'lawyer_consultant_about_image3', 
            array(
                'label'           => sprintf( esc_html__( 'Image 3', 'lawyer-consultant' ), ),
                'settings'  => 'lawyer_consultant_about_image3',
                'section'   => 'lawyer_consultant_home_about_settings'
            ) 
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_heading3',
        array(
            'label'           => sprintf( esc_html__( 'Heading 3', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_heading3' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_content3',
        array(
            'label'           => sprintf( esc_html__( 'Text 3', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_content3' ,
            'type'            => 'text',
        )
    );

    // Price 3
    $wp_customize->add_setting(
        'lawyer_consultant_about_price3',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'lawyer_consultant_about_price3',
        array(
            'label'           => sprintf( esc_html__( 'Price 3', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_price3' ,
            'type'            => 'text',
        )
    );

    // Title Label
    $wp_customize->add_setting( 
        'lawyer_consultant_label_project_settings_4', 
        array(
            'sanitize_callback' => 'lawyer_consultant_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_project_settings_4', 
        array(
            'label'       => esc_html__( 'Services Settings 4', 'lawyer-consultant' ),
            'section'     => 'lawyer_consultant_home_about_settings',
            'type'        => 'lawyer-consultant-title',
            'settings'    => 'lawyer_consultant_label_project_settings_4',
        ) 
    ));

    // About Image 4
    $wp_customize->add_setting(
        'lawyer_consultant_about_image4',
        array(
            'default'           => '',
            'sanitize_callback' => 'lawyer_consultant_sanitize_image',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize, 'lawyer_consultant_about_image4', 
            array(
                'label'           => sprintf( esc_html__( 'Image 4', 'lawyer-consultant' ), ),
                'settings'  => 'lawyer_consultant_about_image4',
                'section'   => 'lawyer_consultant_home_about_settings'
            ) 
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_heading4',
        array(
            'label'           => sprintf( esc_html__( 'Heading 4', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_heading4' ,
            'type'            => 'text',
        )
    );

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

    $wp_customize->add_control(
        'lawyer_consultant_about_content4',
        array(
            'label'           => sprintf( esc_html__( 'Text 4', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_content4' ,
            'type'            => 'text',
        )
    );

    // Price 4
    $wp_customize->add_setting(
        'lawyer_consultant_about_price4',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'lawyer_consultant_about_price4',
        array(
            'label'           => sprintf( esc_html__( 'Price 4', 'lawyer-consultant' ), ),
            'section'         => 'lawyer_consultant_home_about_settings',
            'settings'        => 'lawyer_consultant_about_price4' ,
            'type'            => 'text',
        )
    );

}
endif;

add_action( 'customize_register', 'lawyer_consultant_customizer_home_about_register' );