<?php
/**
* Header Banner Options.
*
* @package Agriculture Farm Lite
*/

$agriculture_farm_lite_default = agriculture_farm_lite_get_default_theme_options();
$agriculture_farm_lite_post_category_list = agriculture_farm_lite_post_category_list();

$wp_customize->add_section( 'agriculture_farm_lite_header_banner_setting',
    array(
    'title'      => esc_html__( 'Slider Settings', 'agriculture-farm-lite' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'agriculture_farm_lite_theme_home_pannel',
    )
);

// Show/Hide Site Logo
$wp_customize->add_setting('agriculture_farm_lite_display_logo', array(
    'default'           => false,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
));
$wp_customize->add_control('agriculture_farm_lite_display_logo', array(
    'label'    => esc_html__('Enable / Disable Site Logo', 'agriculture-farm-lite'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Title
$wp_customize->add_setting('agriculture_farm_lite_display_title', array(
    'default'           => true,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
));
$wp_customize->add_control('agriculture_farm_lite_display_title', array(
    'label'    => esc_html__('Enable / Disable Site Title', 'agriculture-farm-lite'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Tagline
$wp_customize->add_setting('agriculture_farm_lite_display_header_text',
    array(
        'default'           => false,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
    )
);
$wp_customize->add_control('agriculture_farm_lite_display_header_text',
    array(
        'label' => esc_html__('Enable / Disable Site Tagline', 'agriculture-farm-lite'),
        'section' => 'title_tagline',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('agriculture_farm_lite_header_banner',
    array(
        'default' => $agriculture_farm_lite_default['agriculture_farm_lite_header_banner'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
    )
);
$wp_customize->add_control('agriculture_farm_lite_header_banner',
    array(
        'label' => esc_html__('Enable Slider', 'agriculture-farm-lite'),
        'section' => 'agriculture_farm_lite_header_banner_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('agriculture_farm_lite_banner_background_image',
    array(
        'default' => $agriculture_farm_lite_default['agriculture_farm_lite_banner_background_image'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control( $wp_customize,'agriculture_farm_lite_banner_background_image',
        array(
            'label' => __('Slider Background Image','agriculture-farm-lite'),
            'section' => 'agriculture_farm_lite_header_banner_setting',
            'settings' => 'agriculture_farm_lite_banner_background_image',
        )
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_header_banner_cat',
    array(
    'default'           => 'Slider',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_select',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_header_banner_cat',
    array(
    'label'       => esc_html__( 'Slider Post Category', 'agriculture-farm-lite' ),
    'section'     => 'agriculture_farm_lite_header_banner_setting',
    'type'        => 'select',
    'choices'     => $agriculture_farm_lite_post_category_list,
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_slider_section_short_title',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_slider_section_short_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_slider_section_short_title',
    array(
    'label'    => esc_html__( 'Short Title', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_banner_setting',
    'type'     => 'text',
    )
);

/* Our Team */


$wp_customize->add_section( 'agriculture_farm_lite_header_category_setting',
    array(
    'title'      => esc_html__( 'Our Team Settings', 'agriculture-farm-lite' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'agriculture_farm_lite_theme_home_pannel',
    )
);

$wp_customize->add_setting('agriculture_farm_lite_services',
    array(
        'default' => $agriculture_farm_lite_default['agriculture_farm_lite_services'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
    )
);
$wp_customize->add_control('agriculture_farm_lite_services',
    array(
        'label' => esc_html__('Enable Our Team Section', 'agriculture-farm-lite'),
        'section' => 'agriculture_farm_lite_header_category_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_our_team_section_short_title',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_our_team_section_short_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_our_team_section_short_title',
    array(
    'label'    => esc_html__( 'Short Title', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_our_team_section_title',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_our_team_section_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_our_team_section_title',
    array(
    'label'    => esc_html__( 'Main Title', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_our_team_section_content',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_our_team_section_content'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_our_team_section_content',
    array(
    'label'    => esc_html__( 'Content', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_category_setting',
    'type'     => 'text',
    )
);


$wp_customize->add_setting( 'agriculture_farm_lite_our_team_button_text',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_our_team_button_text'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_our_team_button_text',
    array(
    'label'    => esc_html__( 'Button Text', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_our_team_button_link',
    array(
    'default' => $agriculture_farm_lite_default['agriculture_farm_lite_our_team_button_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_our_team_button_link',
    array(
    'label'    => esc_html__( 'Button Url', 'agriculture-farm-lite' ),
    'section'  => 'agriculture_farm_lite_header_category_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'agriculture_farm_lite_locations_post_cat',
    array(
    'default'           => 'Second',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_select',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_locations_post_cat',
    array(
    'label'       => esc_html__( 'Team Post Category', 'agriculture-farm-lite' ),
    'section'     => 'agriculture_farm_lite_header_category_setting',
    'type'        => 'select',
    'choices'     => $agriculture_farm_lite_post_category_list,
    )
);

for ($i=1; $i <=6 ; $i++) {

    $wp_customize->add_setting( 'agriculture_farm_lite_team_section_designation'.$i,
        array(
        'default'           => 'Farmer',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_team_section_designation'.$i,
        array(
        'label'    => esc_html__( 'Designation ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'text',
        )
    );
    $wp_customize->add_setting( 'agriculture_farm_lite_our_team_facebook_link'.$i,
        array(
        'default'           => '#',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_our_team_facebook_link'.$i,
        array(
        'label'    => esc_html__( 'Facebook Link ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'url',
        )
    );

    $wp_customize->add_setting( 'agriculture_farm_lite_our_team_twitter_link'.$i,
        array(
        'default'           => '#',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_our_team_twitter_link'.$i,
        array(
        'label'    => esc_html__( 'Twitter Link ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'url',
        )
    );

    $wp_customize->add_setting( 'agriculture_farm_lite_our_team_pintrest_link'.$i,
        array(
        'default'           => '#',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_our_team_pintrest_link'.$i,
        array(
        'label'    => esc_html__( 'Instagram Link ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'url',
        )
    );

    $wp_customize->add_setting( 'agriculture_farm_lite_our_team_instagram_link'.$i,
        array(
        'default'           => '#',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_our_team_instagram_link'.$i,
        array(
        'label'    => esc_html__( 'Linkedin Link ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'url',
        )
    );

    $wp_customize->add_setting( 'agriculture_farm_lite_our_team_youtube_link'.$i,
        array(
        'default'           => '#',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control( 'agriculture_farm_lite_our_team_youtube_link'.$i,
        array(
        'label'    => esc_html__( 'Watsapp Link ', 'agriculture-farm-lite' ) .$i,
        'section'  => 'agriculture_farm_lite_header_category_setting',
        'type'     => 'url',
        )
    );
}