<?php
/**
 * Hero Section Section options
 *
 * @package Theme Palace
 * @subpackage FavBlog Pro
 * @since FavBlog Pro 1.0.0
 */

// Add Hero Section section
$wp_customize->add_section( 'favblog_hero_section', array(
	'title'             => esc_html__( 'Hero Section','favblog' ),
	'description'       => esc_html__( 'Hero Section options.', 'favblog' ),
	'panel'             => 'favblog_front_page_panel',
	'priority'			=> 20,
	) );

// Hero Section content enable control and setting
$wp_customize->add_setting( 'favblog_theme_options[hero_section_enable]', array(
	'default'			=> 	$options['hero_section_enable'],
	'sanitize_callback' => 'favblog_sanitize_switch_control',
	) );

$wp_customize->add_control( new FavBlog_Switch_Control( $wp_customize, 'favblog_theme_options[hero_section_enable]', array(
	'label'             => esc_html__( 'Hero Section Enable', 'favblog' ),
	'section'           => 'favblog_hero_section',
	'on_off_label' 		=> favblog_switch_options(),
	) ) );

// hero posts drop down chooser control and setting
$wp_customize->add_setting( 'favblog_theme_options[hero_content_category]', array(
	'sanitize_callback' => 'favblog_sanitize_single_category',
) );

$wp_customize->add_control( new FavBlog_Dropdown_Taxonomies_Control( $wp_customize, 'favblog_theme_options[hero_content_category]', array(
	'label'             => esc_html__( 'Select Categories', 'favblog' ),
	'description'       => esc_html__( 'Note: Latest selected no of posts will be shown from selected category', 'favblog' ),
	'type'           	=> 'dropdown-taxonomies',
	'section'           => 'favblog_hero_section',
	'active_callback'	=> 'favblog_is_hero_section_enable',
) ) ); 