<?php  
/**
 * Createing an about us pannel for customizer
 *
 */
// PROJECT SECTION START HERE 
/*============PROJECT SECTION PANEL============*/
$wp_customize->add_section(
    'lz_fitness_testimonials_section',
    array(
        'title'         => __( 'Testimonials Section', 'Luzuk Premium' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
    'lz_fitness_testimonials_section_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'lz_fitness_testimonials_section_disable',
        array(
            'settings'      => 'lz_fitness_testimonials_section_disable',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Disable Section', 'Luzuk Premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk Premium' ),
                'off' => __( 'No', 'Luzuk Premium' )
            )   
        )
    )
);
// backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#ffffff');

backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#6A1B9A', get_template_directory_uri().'/images/testimonials-bg.jpg', 'color');

addColorPalatOption($wp_customize, 'lz_testimonials_completetestsectopbrssColor', 'lz_fitness_testimonials_section', 'Testimonial Section Top Border Color ', '#f1f1f1');

lzCustomLable($wp_customize, 'testimonials_Overlay', 'lz_fitness_testimonials_section', 'Set Overlay:');

$wp_customize->add_setting(
    'testimonials_areaOpacity',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0.7', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'testimonials_areaOpacity',
    array(
        'settings'      => 'testimonials_areaOpacity',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Opacity', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'lz_testimonials_overlayColor', 'lz_fitness_testimonials_section', 'Testimonial Section Overlay Color ', '#000');


$wp_customize->add_setting(
    'lz_fitness_testimonials_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_testimonials_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_testimonials_title_subtitle_heading',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Section Title & Sub Title', 'Luzuk Premium' ),
        )
    )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Client Testimonials', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_title',
    array(
        'settings'      => 'lz_fitness_testimonials_title',
        'section'       => 'lz_fitness_testimonials_section', 
        'type'          => 'text',
        'label'         => __( 'Title for section', 'Luzuk Premium' )
    )
);
addColorPalatOption($wp_customize, 'lz_testimonials_sectionHeadingColor', 'lz_fitness_testimonials_section', 'Section Title Color ', '#313131');


$wp_customize->add_setting(
    'lz_fitness_testimonials_text',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'consectetur adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula. Sed at blandit ante. Vivamus feugiat.', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_text',
    array(
        'settings'      => 'lz_fitness_testimonials_text',
        'section'       => 'lz_fitness_testimonials_section', 
        'type'          => 'textarea',
        'label'         => __( 'Sub Title for section', 'Luzuk Premium' )
    )
);
addColorPalatOption($wp_customize, 'lz_testimonials_maintextColor', 'lz_fitness_testimonials_section', 'Sub Title Color ', '#6d6c6c');



/*for note text*/
$wp_customize->add_setting('lz_testimonials_sectionnoteser_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Info_Text( 
        $wp_customize,
        'lz_testimonials_sectionnoteser_lbl',
        array(
            'settings'      => 'lz_testimonials_sectionnoteser_lbl',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Note:', 'Luzuk Premium' ),    
            'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the all testimonials in a page', 'Luzuk Premium' ),
        )
    )
);
/*for note text*/


$wp_customize->add_setting('lz_fitness_testimonials_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_testimonials_npp_heading',
        array(
            'settings'      => 'lz_fitness_testimonials_npp_heading',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Number Of Testimonials to show', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_testimonials_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 2));
$wp_customize->add_control(
    'lz_fitness_testimonials_npp_count',
    array(
        'settings'      => 'lz_fitness_testimonials_npp_count',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'select',
        'label'         => __( 'Number of Testimonials to show', 'Luzuk Premium' ),
        'choices'=>array(1,2,3,4)
    )
);


// PROJECT PAGES
for( $i = 1; $i <= 4; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_testimonials_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_testimonials_heading'.$i,
            array(
                'settings'      => 'lz_fitness_testimonials_heading'.$i,
                'section'       => 'lz_fitness_testimonials_section',
                'label'         => __( 'Client Testimonial', 'Luzuk Premium' ).$i,
            )
        )
    );
    if(is_array($lzFitnesstestimonialsSingleChoice)){
        $wp_customize->add_setting(
            'lz_fitness_testimonials_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'lz_fitness_testimonials_page'.$i,
            array(
                'settings'      => 'lz_fitness_testimonials_page'.$i,
                'section'       => 'lz_fitness_testimonials_section',
                'type'=> 'select',
                'label'         => __( 'Select a Client Testimonial', 'Luzuk Premium' ),
                'choices' => $lzFitnesstestimonialsSingleChoice,
            )
        );
    }else{
        $wp_customize->add_setting('lz_fitness_testimonials_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Info_Text( 
                $wp_customize,
                'lz_fitness_testimonials_section_lbl'.$i,
                array(
                    'settings'      => 'lz_fitness_testimonials_section_lbl'.$i,
                    'section'       => 'lz_fitness_testimonials_section',
                    'label'         => __( 'Note:', 'Luzuk Premium' ),    
                    'description'   => __( '<strong>Changes will not reflect unless you select the testimonials.</strong> <br/>Please add the Testimonials from "Testimonials menu" and then select Testimonials to show information.', 'Luzuk Premium' ),
                )
            )
        );
    }

}
$wp_customize->add_setting(
    'lz_fitness_testimonials_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_testimonials_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_testimonials_title_subtitle_heading',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Section Colors', 'Luzuk Premium' ),
        )
    )
);
addColorPalatOption($wp_customize, 'lz_testimonials_boxbackgroundcColor', 'lz_fitness_testimonials_section', 'Testimonial Box Background Color ', '#7d7985a8');
addColorPalatOption($wp_customize, 'lz_testimonials_boximagebordercColor', 'lz_fitness_testimonials_section', 'Testimonial Image Border Color ', '#c2b5e3');
addColorPalatOption($wp_customize, 'lz_testimonials_boximageborderhvrscColor', 'lz_fitness_testimonials_section', 'Testimonial Image Hover Border Color ', '#5e3cad');

addColorPalatOption($wp_customize, 'lz_testimonials_testtextcColor', 'lz_fitness_testimonials_section', 'Testimonial Text Color ', '#fff');
addColorPalatOption($wp_customize, 'lz_testimonials_testclientnamecColor', 'lz_fitness_testimonials_section', 'Testimonial Name Text Color ', '#dcd7ff');

addColorPalatOption($wp_customize, 'lz_testimonials_testclientnamehvcColor', 'lz_fitness_testimonials_section', 'Testimonial Name Text Hover Color ', '#5e3cad');

addColorPalatOption($wp_customize, 'lz_testimonials_testclientdesigntextcColor', 'lz_fitness_testimonials_section', 'Testimonial Designation Text Color ', '#c2b4e7');
addColorPalatOption($wp_customize, 'lz_testimonials_testcompletebxbrscColor', 'lz_fitness_testimonials_section', 'Testimonial box Border Color ', '#d8d8da');

addColorPalatOption($wp_customize, 'lz_testimonials_completesecboxhvrborderColor', 'lz_fitness_testimonials_section', 'Testimonial Box Hover Border Color ', '#5e3cad');

$wp_customize->add_setting(
    'lz_fitness_testimonials_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_testimonials_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_testimonials_title_subtitle_heading',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Section Next Preview Button Colors', 'Luzuk Premium' ),
        )
    )
);

addColorPalatOption($wp_customize, 'lz_testimonials_testbtntextcColor', 'lz_fitness_testimonials_section', 'Testimonial Button Text Color ', '#5e3cad');
addColorPalatOption($wp_customize, 'lz_testimonials_testbtntexthvrccColor', 'lz_fitness_testimonials_section', 'Testimonial Button Text Hover Color ', '#ffffff');

addColorPalatOption($wp_customize, 'lz_testimonials_testbtnbackgroundColor', 'lz_fitness_testimonials_section', 'Testimonial Button Background Color ', '#D6D6D6');
addColorPalatOption($wp_customize, 'lz_testimonials_testbtntxtbgsshverColor', 'lz_fitness_testimonials_section', 'Testimonial Button Background Hover Color ', '#5e3cad');