<?php
/**
 * Latest Posts options.
 *
 * @package Spirit Business
 */

$spirit_business_default = spirit_business_get_default_theme_options();

// Featured Latest Posts Section
$wp_customize->add_section( 'section_latest_posts',
	array(
	'title'      => __( 'Latest Posts Section', 'spirit-business' ),
	'priority'   => 100,
	'capability' => 'edit_theme_options',
	'panel'      => 'home_page_panel',
	)
);

// Enable Latest Posts Section
$wp_customize->add_setting('theme_options[enable_latest_posts_section]', 
	array(
	'default' 			=> $spirit_business_default['enable_latest_posts_section'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'spirit_business_sanitize_checkbox'
	)
);

$wp_customize->add_control('theme_options[enable_latest_posts_section]', 
	array(		
	'label' 	=> __('Enable Latest Posts Section', 'spirit-business'),
	'section' 	=> 'section_latest_posts',
	'settings'  => 'theme_options[enable_latest_posts_section]',
	'type' 		=> 'checkbox',	
	)
);

// Section Sub Title
$wp_customize->add_setting('theme_options[latest_posts_section_sub_title]', 
	array(
	'default'           => $spirit_business_default['latest_posts_section_sub_title'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control('theme_options[latest_posts_section_sub_title]', 
	array(
	'label'       => __('Section Sub Title', 'spirit-business'),
	'section'     => 'section_latest_posts',   
	'settings'    => 'theme_options[latest_posts_section_sub_title]',	
	'type'        => 'text'
	)
);

// Section Title
$wp_customize->add_setting('theme_options[latest_posts_section_title]', 
	array(
	'default'           => $spirit_business_default['latest_posts_section_title'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control('theme_options[latest_posts_section_title]', 
	array(
	'label'       => __('Section Title', 'spirit-business'),
	'section'     => 'section_latest_posts',   
	'settings'    => 'theme_options[latest_posts_section_title]',	
	'type'        => 'text'
	)
);