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

//backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#fff');
//backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#ffffff', get_template_directory_uri().'/images/testimonial.jpg', 'img');
backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#ffffff');


$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', 'gurukul' ),
        )
    )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'What other said about us', 'gurukul' )
    )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_title',
    array(
        'settings'      => 'lz_fitness_testimonials_title',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'textarea',
        'label'         => __( 'Title', 'gurukul' )
    )
);
lzAddElement($wp_customize, 'lz_fitness_testimonials_sub_text', 'lz_fitness_testimonials_section', 'text', $label="Sub Title", 'lz_fitness_sanitize_text', 'CLIENT’S TESTIMONIALS');


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:', 'gurukul' ), 
                '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.', 'gurukul' ),
            )
        )
    );
}
$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:', 'gurukul' ), 
            'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the Testimonials in a page ', 'gurukul' ),
        )
    )
);
//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'         => __( 'Client Testimonials ', 'gurukul' ).$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', 'gurukul' ),
            'choices' => $lzFitnessTesimonialsSingleChoice,
        )
    );
}
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TextColor', 'lz_fitness_testimonials_section', 'Heading color', '#7854c0');
// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_HeadingColor', 'lz_fitness_testimonials_section', 'Sub Heading color', '#000000');

// subText color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_SubTextColor', 'lz_fitness_testimonials_section', 'Sub Text color', '#474646');
// membar name Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_membarColor', 'lz_fitness_testimonials_section', 'Member Name Text color', '#7854c0');

// designation Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_DSubTextColor', 'lz_fitness_testimonials_section', 'designation Text color', '#000');

// TESTIMONIALS SECTION END HERE 