<?php 
// TESTIMONIALS SECTION START HERE 
/*============TESTIMONIALS SECTION PANEL============*/
$wp_customize->add_section(
    'lz_fitness_testimonials_section',
    array(
        'title'         => __( 'Testimonials Section', 'lz-fitness-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', 'lz-fitness-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'lz-fitness-premium' ),
                'off' => __( 'No', 'lz-fitness-premium' )
            )   
        )
    )
);

backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#01beff', get_template_directory_uri().'/images/default-gray.png', 'img');

$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', 'lz-fitness-premium' ),
        )
    )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Testimonials', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_title',
    array(
        'settings'      => 'lz_fitness_testimonials_title',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'lz-fitness-premium' )
    )
);

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_HeadingColor', 'lz_fitness_testimonials_section', 'Heading color', '#fff');

       // Heading border color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_HeadingborderColor', 'lz_fitness_testimonials_section', 'Section Heading border color', '#fff');
// Heading border icon color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_HeadingbordericonColor', 'lz_fitness_testimonials_section', 'Section Heading border icon color', '#fff');

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:', 'lz-fitness-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.', 'lz-fitness-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:', 'lz-fitness-premium' ), 
            'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the Testimonials in a page ', 'lz-fitness-premium' ),
        )
    )
);
//TESTIMONIALS PAGES
for( $i = 1; $i < 13; $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 Testimonials ', 'lz-fitness-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', 'lz-fitness-premium' ),
            'choices' => $lzFitnessTesimonialsSingleChoice,
        )
    );
}

// title color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TitleColor', 'lz_fitness_testimonials_section', 'Client name color', '#444444');

// designation color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_desgColor', 'lz_fitness_testimonials_section', 'Designation color', '#444444');

// border color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_borderColor', 'lz_fitness_testimonials_section', 'Border color', '#01beff');

// Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TextColor', 'lz_fitness_testimonials_section', 'Testimonial color', '#444444');

// title hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TitlehoverColor', 'lz_fitness_testimonials_section', 'Client name hover color', '#fff');

// designation hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_desghoverColor', 'lz_fitness_testimonials_section', 'Designation hover color', '#fff');

// border hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_borderhoverColor', 'lz_fitness_testimonials_section', 'Border hover color', '#fff');

// Text hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TexthoverColor', 'lz_fitness_testimonials_section', 'Testimonial hover color', '#fff');

// box color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_boxColor', 'lz_fitness_testimonials_section', 'Testimonial box color', '#fff');

// box hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_boxhoverColor', 'lz_fitness_testimonials_section', 'Testimonial box hover color', '#ff6796');

// slider left bitton color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderleftbtnColor', 'lz_fitness_testimonials_section', 'Slider left button color', '#fff');

// slider left bitton border color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderleftbtnborderColor', 'lz_fitness_testimonials_section', 'Slider left button border color', '#fff');

// slider left bitton hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderleftbtnhoverColor', 'lz_fitness_testimonials_section', 'Slider left button hover color', '#ff6796');

// slider left bitton border hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderleftbtnborderhoverColor', 'lz_fitness_testimonials_section', 'Slider left button border hover color', '#ff6796');


// slider right button color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderrightbtnColor', 'lz_fitness_testimonials_section', 'Slider right button color', '#fff');

// slider right button border color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderrightbtnborderColor', 'lz_fitness_testimonials_section', 'Slider right button border color', '#fff');

// slider right button hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderrightbtnhoverColor', 'lz_fitness_testimonials_section', 'Slider right button hover color', '#ff6796');

// slider right button border hover color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_sliderrightbtnborderhoverColor', 'lz_fitness_testimonials_section', 'Slider right button border hover color', '#ff6796');


// TESTIMONIALS SECTION END HERE 