<?php
/**
 * Createing an about us pannel for customizer
 */

// START ABOUT SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_aboutus_section',
        array(
            'title' => __( 'About Us Section', 'lz-fitness-premium' ),
            'panel' => 'lz_fitness_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'lz_fitness_premium_aboutus_section_disable',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'lz_fitness_premium_aboutus_section_disable',
            array(
                'settings'      => 'lz_fitness_premium_aboutus_section_disable',
                'section'       => 'lz_fitness_premium_aboutus_section',
                'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lz-fitness-premium' ),
                    'off' => __( 'No', 'lz-fitness-premium' )
                ),
            )
        )
    );

    backgroundManager($wp_customize, 'about', 'lz_fitness_premium_aboutus_section', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');

      $wp_customize->add_setting(
        'lz_fitness_aboutus_title_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_aboutus_title_heading',
            array(
                'settings'      => 'lz_fitness_aboutus_title_heading',
                'section'       => 'lz_fitness_premium_aboutus_section',
                'label'         => __( 'ABOUT Title & Text', 'lz-fitness-premium' ),
            )
        )
    );  


    $wp_customize->add_setting(
        'lz_fitness_aboutus_subtitle',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'BEST SOLUTION', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_subtitle',
        array(
            'settings'      => 'lz_fitness_aboutus_subtitle',
            'section'       => 'lz_fitness_premium_aboutus_section',
            'type'          => 'text',
            'label'         => __( 'Subtitle for section', 'lz-fitness-premium' )
        )
    );

    // SubHeading color
addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_subHeadingColor', 'lz_fitness_premium_aboutus_section', 'Section Subheading color', '#292e42');


    $wp_customize->add_setting(
        'lz_fitness_aboutus_title',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'Who We Are', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_title',
        array(
            'settings'      => 'lz_fitness_aboutus_title',
            'section'       => 'lz_fitness_premium_aboutus_section',
            'type'          => 'text',
            'label'         => __( 'Title for section', 'lz-fitness-premium' )
        )
    );


     // Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_HeadingColor', 'lz_fitness_premium_aboutus_section', 'Section Heading color', '#272e3e');

    // Heading border color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_HeadingborderColor', 'lz_fitness_premium_aboutus_section', 'Section Heading border color', '#d0ac62');


    $wp_customize->add_setting(
        'lz_fitness_aboutus_subText',
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('There are many variations of passages of Lorem Ipsum available, but majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anything.There are many variations of passages of Lorem Ipsum available.', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_subText',
        array(
            'settings' =>'lz_fitness_aboutus_subText',
            'section' => 'lz_fitness_premium_aboutus_section',
            'type'=> 'textarea',
            'label'=> __('Content for the section', 'lz-fitness-premium')
        )
    );

    $wp_customize->add_setting(
        'lz_fitness_aboutus_text',
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('Embarrassing hidden in the middle of text. All the Lorem Ipsum generators the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet.If you are going to use a passage of Lorem Ipsum', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_text',
        array(
            'settings' =>'lz_fitness_aboutus_text',
            'section' => 'lz_fitness_premium_aboutus_section',
            'type'=> 'textarea',
            'label'=> __('Content for the section', 'lz-fitness-premium')
        )
    );

       // Text color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_TextColor', 'lz_fitness_premium_aboutus_section', 'Text color', '#303030');

    // Text highlight color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_TexthighlightColor', 'lz_fitness_premium_aboutus_section', 'Text highlight color', '#d0ac62');


lzCustomLable($wp_customize, 'lz_fitness_aboutus_lblbuttonabtdisplay', 'lz_fitness_premium_aboutus_section', 'About Us Button Display & Text Setting:');
// to show & hide another button
$wp_customize->add_setting( 'about_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'about_button_display', array( 'label' => 'Button Display', 'section' => 'lz_fitness_premium_aboutus_section', 'settings' => 'about_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) ); 
// end to show & hide button
// appointment 
$wp_customize->add_setting(
    'lz_fitness_aboutus_abtbtntitle',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'More About Us' )
    )
);
$wp_customize->add_control(
    'lz_fitness_aboutus_abtbtntitle',
    array(
        'settings'      => 'lz_fitness_aboutus_abtbtntitle',
        'section'       => 'lz_fitness_premium_aboutus_section',
        'type'          => 'text',
        'label'         => __( 'About Us Button Text', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting('lz_fitness_aboutus_abtbtnlink',   array('default'=> 'add link here', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('lz_fitness_aboutus_abtbtnlink',
    array(
        'settings'      => 'lz_fitness_aboutus_abtbtnlink',
        'section'       => 'lz_fitness_premium_aboutus_section',
        'type'          => 'url',
        'label'         => __( 'Add "About us Button" link here', 'lz-fitness-premium' )
    )
);


     // butn Text color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_btnTextColor', 'lz_fitness_premium_aboutus_section', 'Button text color', '#fff');

     // butn bg color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_btnbgColor', 'lz_fitness_premium_aboutus_section', 'Button background color', '#d0ac62');

       // butn Text hover color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_btnTexthoverColor', 'lz_fitness_premium_aboutus_section', 'Button text hover color', '#fff');

     // butn bg hover color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_btnbghoverColor', 'lz_fitness_premium_aboutus_section', 'Button background hover color', '#3a4559');


    $wp_customize->add_setting(
        'lz_fitness_about_signature_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_about_signature_heading',
            array(
                'settings'      => 'lz_fitness_about_signature_heading',
                'section'       => 'lz_fitness_premium_aboutus_section',
                'label'         => __( 'Signature Image', 'lz-fitness-premium' ),
            )
        )
    );

      $wp_customize->add_setting(
        'lz_fitness_about_signature',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'lz_fitness_about_signature',
            array(
                'section' => 'lz_fitness_premium_aboutus_section',
                'settings' => 'lz_fitness_about_signature',
                'description' => __('Recommended Image Size: 500X600px', 'lz-fitness-premium')
            )
        )
    );


$wp_customize->add_setting(
        'lz_fitness_about_image_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_about_image_heading',
            array(
                'settings'      => 'lz_fitness_about_image_heading',
                'section'       => 'lz_fitness_premium_aboutus_section',
                'label'         => __( 'Right Image', 'lz-fitness-premium' ),
            )
        )
    );

      $wp_customize->add_setting(
        'lz_fitness_about_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'lz_fitness_about_image',
            array(
                'section' => 'lz_fitness_premium_aboutus_section',
                'settings' => 'lz_fitness_about_image',
                'description' => __('Recommended Image Size: 500X600px', 'lz-fitness-premium')
            )
        )
    );


     // image border color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_imgborderColor', 'lz_fitness_premium_aboutus_section', 'Image border color', '#d0ac62');

     //image highlight border color
    addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_imghighlightborderColor', 'lz_fitness_premium_aboutus_section', 'Image highlight border color', '#fff');

    // END ABOUT SECTION 