<?php
/**
 * Features options.
 *
 * @package Party Planner Bell
 */

$default = party_planner_bell_get_default_theme_options();

// Features Section
$wp_customize->add_section( 'section_home_features',
	array(
		'title'      => __( 'Features Section', 'party-planner-bell' ),
		'capability' => 'edit_theme_options',
		'panel'      => 'home_page_panel',
		)
);

$wp_customize->add_setting( 'theme_options[disable_features_section]',
	array(
		'default'           => $default['disable_features_section'],
		'type'              => 'theme_mod',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'party_planner_bell_sanitize_switch_control',
	)
);
$wp_customize->add_control( new Party_Planner_Bell_Switch_Control( $wp_customize, 'theme_options[disable_features_section]',
    array(
		'label' 			=> __('Enable/Disable Features Section', 'party-planner-bell'),
		'section'    		=> 'section_home_features',
		 'settings'  		=> 'theme_options[disable_features_section]',
		'on_off_label' 		=> party_planner_bell_switch_options(),
    )
) );


// Setting  Features Category.
$wp_customize->add_setting( 'theme_options[features_category]',
	array(

	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'absint',
	)
);
$wp_customize->add_control(
	new Party_Planner_Bell_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[features_category]',
		array(
		'label'    => __( 'Select Category', 'party-planner-bell' ),
		'section'  => 'section_home_features',
		'settings' => 'theme_options[features_category]',	
		'active_callback' => 'party_planner_bell_features_active',		
		)
	)
);
// Cta Button Text
$wp_customize->add_setting('theme_options[features_button_label]', 
	array(
	'default' 			=> $default['features_button_label'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control('theme_options[features_button_label]', 
	array(
	'label'       => __('Button Label', 'party-planner-bell'),
	'section'     => 'section_home_features',   
	'settings'    => 'theme_options[features_button_label]',	
	'active_callback' => 'party_planner_bell_features_active',	
	'type'        => 'text'
	)
);