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

// START ABOUT SECTION 
    $wp_customize->add_section(
        'premium_aboutus_section',
        array(
            'title' => __( 'About Us Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'premium_aboutus_section_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'premium_aboutus_section_disable',
            array(
                'settings'      => 'premium_aboutus_section_disable',
                'section'       => 'premium_aboutus_section',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );

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

      $wp_customize->add_setting(
        'aboutus_title_heading',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'aboutus_title_heading',
            array(
                'settings'      => 'aboutus_title_heading',
                'section'       => 'premium_aboutus_section',
                'label'         => __( 'ABOUT Title & Text', 'luzuk-premium' ),
            )
        )
    );  

    $wp_customize->add_setting(
        'aboutus_title',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'ABOUT US', 'luzuk-premium' )
        )
    );
    $wp_customize->add_control(
        'aboutus_title',
        array(
            'settings'      => 'aboutus_title',
            'section'       => 'premium_aboutus_section',
            'type'          => 'text',
            'label'         => __( 'Title for section', 'luzuk-premium' )
        )
    );

     // Heading color
    addColorPalatOption($wp_customize, 'aboutus_page_HeadingColor', 'premium_aboutus_section', 'Section Heading color', '#2d2d2d');

    // Heading border color
    addColorPalatOption($wp_customize, 'aboutus_HeadingborderColor', 'premium_aboutus_section', 'Section Heading border color', '#D79800');


$wp_customize->add_setting(
        'about_image_heading',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'about_image_heading',
            array(
                'settings'      => 'about_image_heading',
                'section'       => 'premium_aboutus_section',
                'label'         => __( 'Left Image', 'luzuk-premium' ),
            )
        )
    );

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

     // image border color
    addColorPalatOption($wp_customize, 'aboutus_page_imgborderColor', 'premium_aboutus_section', 'Image border color', '#D79800');

     // image border bg color
    addColorPalatOption($wp_customize, 'aboutus_page_imgborderbgColor', 'premium_aboutus_section', 'Image border background color', '#fff');


    $wp_customize->add_setting(
        'aboutus_subText',
        array(
            'sanitize_callback'=>'luzuk_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.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.', 'luzuk-premium')
        )
    );
    $wp_customize->add_control(
        'aboutus_subText',
        array(
            'settings' =>'aboutus_subText',
            'section' => 'premium_aboutus_section',
            'type'=> 'textarea',
            'label'=> __('Content for the section', 'luzuk-premium')
        )
    );


       // Text color
    addColorPalatOption($wp_customize, 'aboutus_page_TextColor', 'premium_aboutus_section', 'Text color', '#323232');

    // Text highlight color
    addColorPalatOption($wp_customize, 'aboutus_page_TexthighlightColor', 'premium_aboutus_section', 'Text highlight color', '#D79800');


    $wp_customize->add_setting(
        'aboutus_text',
        array(
            'sanitize_callback'=>'luzuk_sanitize_text',
            'default'=> __('<ul><li>Embarrassing hidden in the middle of text.</li> <li>All the Lorem Ipsum generators the Internet tend to repeat predefined chunks as necessary,</li> <li>making this the first true generator on the Internet.If you are going to use a passage.</li></ul>', 'luzuk-premium')
        )
    );
    $wp_customize->add_control(
        'aboutus_text',
        array(
            'settings' =>'aboutus_text',
            'section' => 'premium_aboutus_section',
            'type'=> 'textarea',
            'label'=> __('List for the section', 'luzuk-premium')
        )
    );


      // Text list icon color
    addColorPalatOption($wp_customize, 'aboutus_page_listiconColor', 'premium_aboutus_section', 'List icon color', '#D79800');


      // Text list color
    addColorPalatOption($wp_customize, 'aboutus_page_listColor', 'premium_aboutus_section', 'List color', '#323232');


lzCustomLable($wp_customize, 'aboutus_lblbuttonabtdisplay', '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' => '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(
    'aboutus_abtbtntitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Read More' )
    )
);
$wp_customize->add_control(
    '\aboutus_abtbtntitle',
    array(
        'settings'      => 'aboutus_abtbtntitle',
        'section'       => 'premium_aboutus_section',
        'type'          => 'text',
        'label'         => __( 'About Us Button Text', 'luzuk-premium' )
    )
);
$wp_customize->add_setting('aboutus_abtbtnlink',   array('default'=> 'add link here', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('aboutus_abtbtnlink',
    array(
        'settings'      => 'aboutus_abtbtnlink',
        'section'       => 'premium_aboutus_section',
        'type'          => 'url',
        'label'         => __( 'Add "About us Button" link here', 'luzuk-premium' )
    )
);


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

     // butn bg color
    addColorPalatOption($wp_customize, 'aboutus_page_btnbgColor', 'premium_aboutus_section', 'Button background color', '#D79800');

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

     // butn bg hover color
    addColorPalatOption($wp_customize, 'aboutus_page_btnbghoverColor', 'premium_aboutus_section', 'Button background hover color', '#2a2a2a');

    // END ABOUT SECTION 