<?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='#69489d');   

//backgroundManager($wp_customize, 'testimonials', 'lz_fitness_testimonials_section', $color='#fff');

$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', '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' )
    )
);
$wp_customize->add_setting(
   'lz_fitness_testimonials_sub_title',
   array(
       'sanitize_callback' => 'lz_fitness_sanitize_text',
       'default'           => __( 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.', 'lz-fitness-premium' )
   )
);
$wp_customize->add_control(
    'lz_fitness_testimonials_sub_title',
   array(
       'settings'      => 'lz_fitness_testimonials_sub_title',
       'section'       => 'lz_fitness_testimonials_section',
       'type'          => 'textarea',
       'label'         => __( 'Sub Title', 'lz-fitness-premium' )
   )
);

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 < 5; $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,
        )
    );
}
// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TitleColor', 'lz_fitness_testimonials_section', 'Heading color', '#69489d');
// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_SubtitleTitleColor', 'lz_fitness_testimonials_section', 'Sub Heading color', '#ffffff');
// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_spanBackgroundColor', 'lz_fitness_testimonials_section', 'Heading Background color', '#ffffff');
    // outline color 
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_spanoulineHeadingColor', 'lz_fitness_testimonials_section', 'Outline Color', '#ffffff');


// Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TextColor', 'lz_fitness_testimonials_section', 'Text color', '#ffffff');
// Title color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_BorderColor', 'lz_fitness_testimonials_section', 'Border color', '#ffffff');
// TESTIMONIALS SECTION END HERE 