<?php
/**
 * Theme Options related to slider
 *
 * @package Education_Soul
 */

$default = education_soul_get_default_theme_options();

// Setting header_image_caption_alignment.
$wp_customize->add_setting(
	'theme_options[header_image_enable]',
	array(
		'default'           => $default['header_image_enable'],
		'sanitize_callback' => 'education_soul_sanitize_select',
	)
);
$wp_customize->add_control(
	'theme_options[header_image_enable]',
	array(
		'label'           => esc_html__( 'Enable On', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'select',
		'priority'        => 1,
		'choices'         => array(
			'disabled'    => esc_html__( 'Disabled', 'education-soul-pro' ),
			'homepage'    => esc_html__( 'Homepage', 'education-soul-pro' ),
			'entire-site' => esc_html__( 'Entire Site', 'education-soul-pro' ),
		),
	)
);

$wp_customize->add_setting(
	"theme_options[header_image_title]",
	array(
		'sanitize_callback' => 'education_soul_sanitize_textarea_content',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_title]",
	array(
		'label'   => esc_html__( 'Title', 'education-soul-pro' ),
		'section' => 'header_image',
		'type'    => 'text',
	)
);

$wp_customize->add_setting(
	"theme_options[header_image_caption]",
	array(
		'sanitize_callback' => 'wp_kses_post',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_caption]",
	array(
		'label'           => esc_html__( 'Caption', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'textarea',
	)
);

// Setting header_image_caption_alignment.
$wp_customize->add_setting(
	'theme_options[header_image_caption_alignment]',
	array(
		'default'           => $default['header_image_caption_alignment'],
		'sanitize_callback' => 'education_soul_sanitize_select',
	)
);
$wp_customize->add_control(
	'theme_options[header_image_caption_alignment]',
	array(
		'label'           => esc_html__( 'Caption Alignment', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'select',
		'choices'         => education_soul_get_slider_caption_alignment_options(),
	)
);

$wp_customize->add_setting(
	"theme_options[header_image_url]",
	array(
		'sanitize_callback' => 'esc_url_raw',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_url]",
	array(
		'label'           => esc_html__( 'Link', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'url',
	)
);

$wp_customize->add_setting(
	"theme_options[header_image_primary_button_text]",
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_primary_button_text]",
	array(
		'label'           => esc_html__( 'Primary Button Text', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'text',
	)
);
$wp_customize->add_setting(
	"theme_options[header_image_primary_button_url]",
	array(
		'sanitize_callback' => 'esc_url_raw',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_primary_button_url]",
	array(
		'label'           => esc_html__( 'Primary Button URL', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'url',
	)
);

$wp_customize->add_setting(
	"theme_options[header_image_secondary_button_text]",
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_secondary_button_text]",
	array(
		'label'           => esc_html__( 'Secondary Button Text', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'text',
	)
);
$wp_customize->add_setting(
	"theme_options[header_image_secondary_button_url]",
	array(
		'sanitize_callback' => 'esc_url_raw',
	)
);
$wp_customize->add_control(
	"theme_options[header_image_secondary_button_url]",
	array(
		'label'           => esc_html__( 'Secondary Button URL', 'education-soul-pro' ),
		'section'         => 'header_image',
		'type'            => 'url',
	)
);

// Setting - reset_font_settings.
$wp_customize->add_setting(
	'theme_options[header_image_url_target]',
	array(
		'sanitize_callback' => 'education_soul_sanitize_checkbox',
	)
);
$wp_customize->add_control(
	'theme_options[header_image_url_target]',
	array(
		'label'       => esc_html__( 'Open link in New Tab', 'education-soul-pro' ),
		'section'     => 'header_image',
		'type'        => 'checkbox',
	)
);
