<?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='#ffffff');


    $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'         => __( 'Left 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')
            )
        )
    );


    $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, SubTitle & Text', 'lz-fitness-premium' ),
            )
        )
    );    
    $wp_customize->add_setting(
        'lz_fitness_aboutus_title',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'About Us', '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' )
        )
    );

$wp_customize->add_setting(
        'lz_fitness_aboutus_subheading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_subheading',
        array(
            'settings'      => 'lz_fitness_aboutus_subheading',
            'section'       => 'lz_fitness_premium_aboutus_section',
            'type'          => 'textarea',
            'label'         => __( 'Sub Title for section', 'lz-fitness-premium' )
        )
    );


    lzAddElement($wp_customize, 'lz_fitness_aboutus_subTitle', 'lz_fitness_premium_aboutus_section', 'textarea', $label="Text", 'lz_fitness_sanitize_text', 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard Mlintck, a Latin professor at Hampden Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, fromem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. 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 embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary.');

    $wp_customize->add_setting(
        'lz_fitness_aboutus_text',
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('Obscure Latin words, consectetur, fromem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. There are many variations of passes Lorem Ipsum available, but the 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 embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary.', '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'=> __('Text', 'lz-fitness-premium')
        )
    );

    $wp_customize->add_setting(
        'abtbtntxt',
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('Read More', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'abtbtntxt',
        array(
            'settings' =>'abtbtntxt',
            'section' => 'lz_fitness_premium_aboutus_section',
            'type'=> 'text',
            'label'=> __('Button Text', 'lz-fitness-premium')
        )
    );


    $wp_customize->add_setting(
        'lz_fitness_aboutus_page',
        array(
            'sanitize_callback'=> 'absint',
            'default' => __('About Page Readmore Link', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'lz_fitness_aboutus_page',
        array(
            'settings'=> 'lz_fitness_aboutus_page',
            'section' => 'lz_fitness_premium_aboutus_section',
            'type'=>'select',
            'label'=>__('Link to About us page', 'lz-fitness-premium'),
            'choices'=>$lz_fitness_page_choice
        )
    );


addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_HeadingColor', 'lz_fitness_premium_aboutus_section', 'Heading Color', '#ffffff');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_SpanHeadingColor', 'lz_fitness_premium_aboutus_section', 'Sub Heading Color', '#2b2b2b');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_spanbHeadingColor', 'lz_fitness_premium_aboutus_section', 'Heading Background Color', '#69489d');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_spanoulineHeadingColor', 'lz_fitness_premium_aboutus_section', 'Outline Color', '#69489d');


addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_TextColor', 'lz_fitness_premium_aboutus_section', 'Text Color', '#2b2b2b');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_ButtonTextColor', 'lz_fitness_premium_aboutus_section', 'Button Text Color', '#69489d');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_BorderColor', 'lz_fitness_premium_aboutus_section', 'Button Border Color', '#69489d');

addColorPalatOption($wp_customize, 'lz_fitness_aboutus_page_beforafterColor', 'lz_fitness_premium_aboutus_section', 'Image Border Color', '#aeaeae');

    // END ABOUT SECTION 