<?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='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'testimonialssection_padding', 'lz_fitness_testimonials_section', ' Section Padding Setting:');

$wp_customize->add_setting(
    'sectiontestimonials_toppadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'sectiontestimonials_toppadding',
    array(
        'settings'      => 'sectiontestimonials_toppadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'sectiontestimonials_bottompadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'sectiontestimonials_bottompadding',
    array(
        'settings'      => 'sectiontestimonials_bottompadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'sectiontestimonials_leftpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'sectiontestimonials_leftpadding',
    array(
        'settings'      => 'sectiontestimonials_leftpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Section Left Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'sectiontestimonials_rightpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'sectiontestimonials_rightpadding',
    array(
        'settings'      => 'sectiontestimonials_rightpadding',
        'section'       => 'lz_fitness_testimonials_section',
        'type'          => 'text',
        'label'         => __( 'Section Right Padding', '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 Title & Sub Title', 'luzuk-premium' ),
        )
    )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Client’s 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', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'lz_fitness_testimonials_sub_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Here goes the short description for the section', 'luzuk-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', 'luzuk-premium' )
    )
);

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_HeadingColor', 'lz_fitness_testimonials_section', 'Heading color', $headingColor);
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_testimonials_TextColor', 'lz_fitness_testimonials_section', 'Text color', '#333333');

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 <= 12; $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 ', '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,
        )
    );
}

// TESTIMONIALS SECTION END HERE 