<?php  
// TESTIMONIALS SECTION START HERE 
/*============TESTIMONIALS SECTION PANEL============*/
$wp_customize->add_section(
    'lz_fitness_testimonials_section',
    array(
        'title'         => __( 'Testimonials Section', 'Luzuk Premium' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
    //ENABLE/DISABLE TESTIMONIALS 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');


lzCustomLable($wp_customize, 'lz_fitness_sec_blogsectionpadding', 'lz_fitness_testimonials_section', 'Set Padding For Testimonial Section:');

$wp_customize->add_setting(
    'sec_testimonialsectionTpadding', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionTpadding',
    array(
        'settings'      => 'sec_testimonialsectionTpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Top Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_testimonialsectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionBpadding',
    array(
        'settings'      => 'sec_testimonialsectionBpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Bottom Padding', 'lz-fitness-premium' )
    )
);

$wp_customize->add_setting(
    'sec_testimonialsectionLpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionLpadding',
    array(
        'settings'      => 'sec_testimonialsectionLpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Left Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_testimonialsectionRpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionRpadding',
    array(
        'settings'      => 'sec_testimonialsectionRpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Right Padding', 'lz-fitness-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 Title & Sub Title', 'Luzuk Premium' ),
       )
   )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_sub_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Testimonials', 'lz-fitness-premium', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_sub_title',
    array(
        'settings'      => 'lz_fitness_testimonials_sub_title',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Section Sub Title', 'Luzuk Premium' )
    )
);
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_Subttlsolor', 'lz_fitness_testimonials_section', 'Section Sub Title color', '#68a0f9');
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_Subttlbordersolor', 'lz_fitness_testimonials_section', 'Section Sub Title Border color', '#68a0f9');

$wp_customize->add_setting(
    'lz_fitness_testimonials_title',
    array(
       'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'What Clients Say About US', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_title',
    array(
       'settings'      => 'lz_fitness_testimonials_title',
       'section'       => 'lz_fitness_testimonials_section',
       'type'          => 'text',
       'label'         => __( 'Section Title', 'Luzuk Premium' )
    )
);


// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_mainHeadingColor', 'lz_fitness_testimonials_section', 'Section Title color', '#3b3634');


if(!is_array($lzFitnessTesimonialsSingleChoice)){
    $wp_customize->add_setting('lz_fitness_testimonials_section_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
    $wp_customize->add_control(
        new lz_fitness_Info_Text( 
            $wp_customize,
            'lz_fitness_testimonials_section_lbl',
            array(
                'settings'      => 'lz_fitness_testimonials_section_lbl',
                '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 Testimonial to show information.', 'Luzuk Premium' ),
            )
        )
    );
}
$wp_customize->add_setting('lz_fitness_premium_testimonials_section_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Info_Text( 
        $wp_customize,
        'lz_fitness_premium_testimonials_section_lbl',
        array(
            'settings'      => 'lz_fitness_premium_testimonials_section_lbl',
            'section'       => 'lz_fitness_testimonials_section',
            'label'         => __( 'Note:', 'Luzuk Premium' ), 
            'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the Testimonials in a page ', 'Luzuk Premium' ),
        )
    )
);
//TESTIMONIALS PAGES
for( $i = 1; $i < 10; $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'         => __( 'Testimonial', 'Luzuk Premium' ).$i,
            )
        )
    );
    $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 Testimonials', 'Luzuk Premium' ),
            'choices' => $lzFitnessTesimonialsSingleChoice,
        )
    );
}


addColorPalatOption($wp_customize, 'lz_fitness_testimonials_boxbgssColor', 'lz_fitness_testimonials_section', 'Testimonial Box Background color', '#ffffff');
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_IconboxbgssColor', 'lz_fitness_testimonials_section', 'Testimonial Box Icon color', '#e8e8e9');
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_textColor', 'lz_fitness_testimonials_section', 'Testimonial Text color', '#777777');

addColorPalatOption($wp_customize, 'lz_fitness_testimonials_clientnametextColor', 'lz_fitness_testimonials_section', 'Client Name Text color', '#21202a');
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_clientdesignationtextColor', 'lz_fitness_testimonials_section', 'Client Designation Text color', '#9d9d9f');


addColorPalatOption($wp_customize, 'lz_fitness_testimonials_testimonialindicatorsColor', 'lz_fitness_testimonials_section', 'Testimonial Indicators color', '#c4c2c1');
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_testimonialactiveindicatorsColor', 'lz_fitness_testimonials_section', 'Testimonials Active Indicator color', '#ff7c4e');
