<?php
/**
 * About Us Section options.
 *
 * @package Magic Notes
 */

$default = magic_notes_get_default_theme_options();

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

$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' => 'magic_notes_sanitize_checkbox'
	)
);

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

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

$wp_customize->add_control('theme_options[about_us_title]', 
	array(
	'label'       => __('Title', 'magic-notes'),
	'section'     => 'section_about_us',   
	'settings'    => 'theme_options[about_us_title]',
	'active_callback' => 'magic_notes_about_us_active',		
	'type'        => 'text'
	)
);

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

$wp_customize->add_control('theme_options[about_us_description]', 
	array(
	'label'       => __('Description', 'magic-notes'),
	'section'     => 'section_about_us',   
	'settings'    => 'theme_options[about_us_description]',
	'active_callback' => 'magic_notes_about_us_active',		
	'type'        => 'textarea'
	)
);

// Read more text
$wp_customize->add_setting('theme_options[about_us_read_more_text]', 
	array(
	'default' 			=> $default['about_us_read_more_text'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control('theme_options[about_us_read_more_text]', 
	array(
	'label'       		=> __('Button Label', 'magic-notes'),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_read_more_text]',	
	'active_callback' 	=> 'magic_notes_about_us_active',	
	'type'        		=> 'text'
	)
);

// Read more url
$wp_customize->add_setting('theme_options[about_us_read_more_url]', 
	array(
	'default' 			=> $default['about_us_read_more_url'],
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',	
	'sanitize_callback' => 'esc_url_raw'
	)
);

$wp_customize->add_control('theme_options[about_us_read_more_url]', 
	array(
	'label'       		=> __('Button Url', 'magic-notes'),
	'section'     		=> 'section_about_us',   
	'settings'    		=> 'theme_options[about_us_read_more_url]',	
	'active_callback' 	=> 'magic_notes_about_us_active',	
	'type'        		=> 'url'
	)
);