<?php

//Wordpress customizer controls for the bootstrap carousel

//add carousel support

$wp_customize->add_section('thehoot_carousel', array(
    'title'          => 'Homepage Carousel',
    'priority'       => 25,
));
//Carousel auto slide toggle

$wp_customize->add_setting('thehoot_auto_carousel_toggle', array(

        'default' => 1 ,
        'priority'       => 0,
        'sanitize_callback' => 'thehoot_sanitize_checkbox',
    ));

$wp_customize->add_control('thehoot_auto_carousel_toggle', array(
        'label'     => __('Tick this box to stop the carousel from auto sliding on page load', 'unica'),
        'section'   => 'thehoot_carousel',
        'priority'  => 0,
        'type'      => 'checkbox'
    ));

//First slide settings

$wp_customize->add_setting('first_slide', array(
    'default'        => '',
    'priority'       => 1,
    'sanitize_callback' => 'thehoot_sanitize_image',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'first_slide', array(
    'label'     => __('First Slide', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'first_slide',
    'priority'       => 1,
)));
$wp_customize->add_setting('first_slide_title', array(
    'description' => __('Add title of slide', 'unica'),
    'priority'       => 2,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('first_slide_title', array(
    'label'     => __('First Slide Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'first_slide_title',
    'type' => 'text',
     'priority'       => 2,
)) ;
$wp_customize->add_setting('first_slide_caption', array(
    'description' => __('Add product name', 'unica'),
     'priority'       => 3,
     'sanitize_callback' => 'thehoot_sanitize_text',

));
$wp_customize->add_control('first_slide_caption', array(
    'label'     => __('First Slide Caption', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'first_slide_caption',
    'type' => 'text',
     'priority'       => 3,
)) ;
$wp_customize->add_setting('first_slide_link', array(
    'description' => __('Add link URL', 'unica'),
     'priority'       => 4,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('first_slide_link', array(
    'label'     => __('First Slide Link', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'first_slide_link',
    'type' => 'text',
     'priority'       => 4,
)) ;

$wp_customize->add_setting('first_slide_link_title', array(
    'description' => __('Add engaging link title', 'unica'),
     'priority'       => 5,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('first_slide_link_title', array(
    'label'     => __('First Slide Link Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'first_slide_link_title',
    'type' => 'text',
    'priority'       => 5,
)) ;

//Second slide settings
$wp_customize->add_setting('second_slide', array(
    'default'        => '',
    'priority'       => 6,
    'sanitize_callback' => 'thehoot_sanitize_image',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'second_slide', array(
    'label'   => __('Second Slide', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'second_slide',
    'priority'       => 7,
)));

$wp_customize->add_setting('second_slide_title', array(
     'description' => __('Add title of slide', 'unica'),
     'priority'       => 8,
     'sanitize_callback' => 'thehoot_sanitize_text',
));

$wp_customize->add_control('second_slide_title', array(
    'label'   =>__('Second Slide Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'second_slide_title',
    'type' => 'text',
     'priority'       => 8,
)) ;
$wp_customize->add_setting('second_slide_caption', array(
    'description' => __('Add product name', 'unica'),
    'priority'       => 9,
    'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('second_slide_caption', array(
    'label'   =>__('Second Slide Caption', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'second_slide_caption',
    'type' => 'text',
     'priority'       => 9,
)) ;
$wp_customize->add_setting('second_slide_link', array(
    'description' => __('Add link URL', 'unica'),
     'priority'       => 10,
     'sanitize_callback' => 'thehoot_sanitize_text',
));

$wp_customize->add_control('second_slide_link', array(
    'label'   =>__('Second Slide Link', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'second_slide_link',
    'type' => 'text',
     'priority'       => 10,
)) ;
$wp_customize->add_setting('second_slide_link_title', array(
    'description' => __('Add call to action', 'unica'),
     'priority'       => 11,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('second_slide_link_title', array(
    'label'   =>__('Second Slide Link Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'second_slide_link_title',
    'type' => 'text',
     'priority'       => 11,
)) ;

//Third slide settings
$wp_customize->add_setting('third_slide', array(
    'default'        => '',
    'priority'       => 12,
    'sanitize_callback' => 'thehoot_sanitize_image',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'third_slide', array(
    'label'   =>__('Third Slide', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'third_slide',
     'priority'       => 13,
)));

$wp_customize->add_setting('third_slide_title', array(
    'description' => __('Add title of slide', 'unica'),
     'priority'       => 14,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('third_slide_title', array(
    'label'   =>__('Third Slide Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'third_slide_title',
    'type' => 'text',
     'priority'       => 14,
)) ;
$wp_customize->add_setting('third_slide_caption', array(
     'description' => __('Add product name', 'unica'),
     'priority'       => 15,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('third_slide_caption', array(
    'label'   =>__('Third Slide Caption', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'third_slide_caption',
    'type' => 'text',
     'priority'       => 15,
)) ;
$wp_customize->add_setting('third_slide_link', array(
     'description' => __('Add link URL', 'unica'),
     'priority'       => 16,
     'sanitize_callback' => 'thehoot_sanitize_text',
));

$wp_customize->add_control('third_slide_link', array(
    'label'   =>__('Third Slide Link', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'third_slide_link',
    'type' => 'text',
     'priority'       => 16,
)) ;

$wp_customize->add_setting('third_slide_link_title', array(
     'description' => __('Add engaging link title', 'unica'),
     'priority'       => 17,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('third_slide_link_title', array(
    'label'   =>__('Third Slide Link Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'third_slide_link_title',
    'type' => 'text',
     'priority'       => 17,
)) ;

//Fourth slide settings
$wp_customize->add_setting('fourth_slide', array(
    'default'        => '',
    'priority'       => 18,
    'sanitize_callback' => 'thehoot_sanitize_image',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'fourth_slide', array(
    'label'   => __('Fourth Slide', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'fourth_slide',
     'priority'       => 19,
)));

$wp_customize->add_setting('fourth_slide_title', array(
    'description' => __('Add title of slide', 'unica'),
     'priority'       => 20,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('fourth_slide_title', array(
    'label'   =>  __('Fourth Slide Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'fourth_slide_title',
    'type' => 'text',
     'priority'       => 20,
)) ;
$wp_customize->add_setting('fourth_slide_caption', array(
    'description' => __('Add product name', 'unica'),
     'priority'       => 21,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('fourth_slide_caption', array(
    'label'   =>  __('Fourth Slide Caption', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'fourth_slide_caption',
    'type' => 'text',
     'priority'       => 21,
)) ;
$wp_customize->add_setting('fourth_slide_link', array(
    'description' => __('Add link URL', 'unica'),
     'priority'       => 22,
     'sanitize_callback' => 'thehoot_sanitize_text',
));

$wp_customize->add_control('fourth_slide_link', array(
    'label'   => __('Fourth Slide Link', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'fourth_slide_link',
    'type' => 'text',
     'priority'       => 22,
)) ;
$wp_customize->add_setting('fourth_slide_link_title', array(
    'description' => __('Add link title', 'unica'),
     'priority'       => 23,
     'sanitize_callback' => 'thehoot_sanitize_text',
));
$wp_customize->add_control('fourth_slide_link_title', array(
    'label'   => __('fourth Slide Link Title', 'unica'),
    'section' => 'thehoot_carousel',
    'settings'   => 'fourth_slide_link_title',
    'type' => 'text',
     'priority'       => 23,
)) ;
