<?php
/**
 * About Us options.
 *
 * @package Rock Singer
 */

$default = rock_singer_get_default_theme_options();

// About Us Section
$wp_customize->add_section( 'section_about_us',
	array(
	'title'      		=> __( 'Biography Section', 'rock-singer' ),
	'priority'   		=> 100,
	'capability' 		=> 'edit_theme_options',
	'panel'      		=> 'home_page_panel',
	)
);

// Enable About Us Section
$wp_customize->add_setting('theme_options[enable_about_us_section]', 
	array(
	'default' 			=> $default['enable_about_us_section'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'rock_singer_sanitize_checkbox'
	)
);

$wp_customize->add_control('theme_options[enable_about_us_section]', 
	array(		
	'label' 			=> __('Enable Section', 'rock-singer'),
	'section' 			=> 'section_about_us',
	'settings'  		=> 'theme_options[enable_about_us_section]',
	'type' 				=> 'checkbox',	
	)
);

// Featured Image
$wp_customize->add_setting('theme_options[about_us_featured_image]', 
	array(
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'rock_singer_sanitize_image'
	)
);

$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize,
	'theme_options[about_us_featured_image]', 
	array(
	'label' 			=> __('Featured Image', 'rock-singer'),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_featured_image]',		
	'active_callback' 	=> 'rock_singer_about_us_active',
	'type'        		=> 'image',
	)
	)
);

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

$wp_customize->add_control('theme_options[about_us_subtitle]', 
	array(
	'label' 	  		=> __('Subtitle', 'rock-singer'),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_subtitle]',		
	'active_callback' 	=> 'rock_singer_about_us_active',		
	'type'        		=> 'text'
	)
);

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

$wp_customize->add_control('theme_options[about_us_section_title]', 
	array(
	'label' 			=> __('Section Title', 'rock-singer'),
	'section'       	=> 'section_about_us',   
	'settings'      	=> 'theme_options[about_us_section_title]',		
	'active_callback' 	=> 'rock_singer_about_us_active',		
	'type'        		=> 'text'
	)
);

// Content
$wp_customize->add_setting('theme_options[about_us_content]', 
	array(
	'default' 			=> $default['about_us_content'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'rock_singer_sanitize_textarea_content'
	)
);

$wp_customize->add_control('theme_options[about_us_content]', 
	array(
	'label'       		=> sprintf( __('Content', 'rock-singer')),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_content]',		
	'active_callback' 	=> 'rock_singer_about_us_active',		
	'type'        		=> 'textarea'
	)
);

// Button Label
$wp_customize->add_setting('theme_options[about_us_btn_label]', 
	array(
	'default' 			=> $default['about_us_btn_label'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control('theme_options[about_us_btn_label]', 
	array(
	'label'       		=> sprintf( __('Button Label', 'rock-singer')),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_btn_label]',		
	'active_callback' 	=> 'rock_singer_about_us_active',		
	'type'        		=> 'text'
	)
);

// Button Url
$wp_customize->add_setting('theme_options[about_us_btn_url]', 
	array(
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'esc_url_raw'
	)
);

$wp_customize->add_control('theme_options[about_us_btn_url]', 
	array(
	'label'       		=> sprintf( __('Button Url', 'rock-singer')),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_btn_url]',		
	'active_callback' 	=> 'rock_singer_about_us_active',		
	'type'        		=> 'url'
	)
);