<?php  
// TESTIMONIALS SECTION START HERE 

$wp_customize->add_section(
    'testimonials_area',
    array(
        'title'         => __( 'Testimonials & Skill Section', 'Luzuk Premium' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);
    //ENABLE/DISABLE TESTIMONIALS SECTION
$wp_customize->add_setting(
    'testimonials_area_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'testimonials_area_disable',
        array(
            'settings'      => 'testimonials_area_disable',
            'section'       => 'testimonials_area',
            'label'         => __( 'Disable Section', 'Luzuk Premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk Premium' ),
                'off' => __( 'No', 'Luzuk Premium' )
            )   
        ) 
    )
);
 
backgroundManager($wp_customize, 'testimonials', 'testimonials_area', $color='#f8f8f8', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'luzuk_sec_blogsectionpadding', 'testimonials_area', 'Set Padding For Testimonial Section:');

$wp_customize->add_setting(
    'testimonials_areaTpadding', 
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '4em', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'testimonials_areaTpadding',
    array(
        'settings'      => 'testimonials_areaTpadding',
        'section'       => 'testimonials_area',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Top Padding', 'Luzuk Premium' )
    )
);
$wp_customize->add_setting(
    'testimonials_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'testimonials_areaBpadding',
    array(
        'settings'      => 'testimonials_areaBpadding',
        'section'       => 'testimonials_area',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Bottom Padding', 'Luzuk Premium' )
    )
);

$wp_customize->add_setting(
    'luzuk_testimonials_title_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
       'luzuk_testimonials_title_subtitle_heading',
       array(
           'settings'      => 'luzuk_testimonials_title_subtitle_heading',
           'section'       => 'testimonials_area',
           'label'         => __( 'Section Title & Sub Title', 'Luzuk Premium' ),
       )
   )
);
$wp_customize->add_setting(
    'testimonials_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Heading Here', 'Luzuk Premium', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'testimonials_subtitle',
    array(
        'settings'      => 'testimonials_subtitle',
        'section'       => 'testimonials_area',
        'type'          => 'text',
        'label'         => __( 'Section Sub Title', 'Luzuk Premium' )
    )
);
addColorPalatOption($wp_customize, 'testimonialsarea_secsubtitle_color', 'testimonials_area', 'Section Sub Title Color', '#09c567');

$wp_customize->add_setting(
    'testimonials_title',
    array(
       'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'TESTIMONIALS', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'testimonials_title',
    array(
       'settings'      => 'testimonials_title',
       'section'       => 'testimonials_area',
       'type'          => 'text',
       'label'         => __( 'Section Title', 'Luzuk Premium' )
    )
);

addColorPalatOption($wp_customize, 'testimonialsarea_sectitle_color', 'testimonials_area', 'Section Title Color', '#002a45');

addColorPalatOption($wp_customize, 'testimonialsarea_sectitleborder_color_one', 'testimonials_area', 'Section Title Border color', '#09c567');

$TesimonialsSingleChoice[] = 'select';
if(!is_array($TesimonialsSingleChoice)){
    $wp_customize->add_setting('testimonials_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_Info_Text( 
            $wp_customize,
            'testimonials_area_lbl',
            array(
                'settings'      => 'testimonials_area_lbl',
                'section'       => 'testimonials_area',
                '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('luzuk_premium_testimonials_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_premium_testimonials_area_lbl',
        array(
            'settings'      => 'luzuk_premium_testimonials_area_lbl',
            'section'       => 'testimonials_area',
            '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(
        'luzuk_testimonials_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_testimonials_heading'.$i,
            array(
                'settings'      => 'luzuk_testimonials_heading'.$i,
                'section'       => 'testimonials_area',
                'label'         => __( 'Testimonial', 'Luzuk Premium' ).$i,
            )
        )
    );
    $wp_customize->add_setting(
        'testimonials_page'.$i,
        array(
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control(
        'testimonials_page'.$i,
        array(
            'settings'      => 'testimonials_page'.$i,
            'section'       => 'testimonials_area',
            'type'=> 'select',
            'label'         => __( 'Select a Client Testimonials', 'Luzuk Premium' ),
            'choices' => $TesimonialsSingleChoice,
        )
    );
}

 $wp_customize->add_setting(
        'clientname_image_heading',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'clientname_image_heading',
            array(
                'settings'      => 'clientname_image_heading',
                'section'       => 'testimonials_area',
                'label'         => __( 'Client Name Image', 'luzuk-premium' ),
            )
        )
    );

      $wp_customize->add_setting(
        'clientname_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'clientname_image',
            array(
                'section' => 'testimonials_area',
                'settings' => 'clientname_image',
                'description' => __('Recommended Image Size: 34X34px', 'luzuk-premium')
            )
        )
    );

lzCustomLable($wp_customize, 'luzuk_sectesticolor', 'testimonials_area', 'Left Section Color');

addColorPalatOption($wp_customize, 'luzuk_testimonials_secbordercolor', 'testimonials_area', ' Section Box Background Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_testimonials_imgbordercolor', 'testimonials_area', ' Section Image Icon Color', '#09c567');

addColorPalatOption($wp_customize, 'luzuk_testimonialscontent_textcolor', 'testimonials_area', ' Section Border Color', '#09c567');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Namecolor', 'testimonials_area', 'Section Client Name Color', '#002a45');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Namehovercolor', 'testimonials_area', 'Section Client Name Hover Color', '#09c567');

addColorPalatOption($wp_customize, 'luzuk_testxtcolor', 'testimonials_area', 'Section Text Color', '#878787');

addColorPalatOption($wp_customize, 'luzuk_tesslidrdotbg', 'testimonials_area', ' Section Slider Dots background Color', '#09c567');

addColorPalatOption($wp_customize, 'luzuk_tesslidrdots', 'testimonials_area', ' Section Slider Dots Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_tesslidrdotact', 'testimonials_area', ' Section Slider Dots Active Color', '#002a45');

// ====================================Testimonials Skill Section========================================================

lzCustomLable($wp_customize, 'Tskill_label', 'testimonials_area', 'Testimonials Skill Section');

$wp_customize->add_setting('Tskill_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'Tskill_area_lbl',
        array(
            'settings'      => 'Tskill_area_lbl',
            'section'       => 'testimonials_area',
            'label'         => __( 'Note1:', 'Luzuk' ),  
            'description'   => __( 'Changes will not reflect unless you select an icon for page', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('Tskill_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'Tskill_npp_heading',
        array(
            'settings'      => 'Tskill_npp_heading',
            'section'       => 'testimonials_area',
            'label'         => __( 'Number Of Plans', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('skill_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'skill_npp_count',
    array(
        'settings'      => 'skill_npp_count',
        'section'       => 'testimonials_area',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);
for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'Tskill_page_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'Tskill_page_heading'.$i,
            array(
                'settings'      => 'Tskill_page_heading'.$i,
                'section'       => 'testimonials_area',
                'label'         => __( 'Page ', 'luzuk-premium' ).$i
            )
        )
    );

 $wp_customize->add_setting(
        'skill_page_icon'.$i,
        array(
            'default'           => 'fa fa-qrcode',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'skill_page_icon'.$i,
            array(
                'settings'      => 'skill_page_icon'.$i,
                'section'       => 'testimonials_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );

lzAddElement($wp_customize, 'skill_page_title'.$i, 'testimonials_area', $type = 'text', $label="Section Title", $callback ='luzuk_sanitize_text', $default='Take Responsibilities');

lzAddElement($wp_customize, 'luzuk_skill_page_url_'.$i, 'testimonials_area', $type = 'text', $label="Link", $callback ='esc_url', $default='Add link here');

}

lzCustomLable($wp_customize, 'luzuk_sectestiskilcolor', 'testimonials_area', 'Right Section Color');

addColorPalatOption($wp_customize, 'Tskil_BoxiconColor', 'testimonials_area', 'Section Box Icon Color', '#fff');

addColorPalatOption($wp_customize, 'Tskil_BoxiconhvColor', 'testimonials_area', 'Section Box Icon Hover Color', '#09c567');

addColorPalatOption($wp_customize, 'Tskil_BoxiconbgColor', 'testimonials_area', 'Section Box Icon Background Color', '#09c567');

addColorPalatOption($wp_customize, 'Tskil_BoxiconbghvColor', 'testimonials_area', 'Section Box Icon Background Hover Color', '#002a45');

addColorPalatOption($wp_customize, 'Tskil_Boxheadingclr', 'testimonials_area', 'Section Heading Color', '#fff');

addColorPalatOption($wp_customize, 'Tskil_Boxheadingbgclr', 'testimonials_area', 'Section Heading Background Color', '#002a45');
