<?php
/**
 * Menu options
 *
 * @package Theme Palace
 * @subpackage Teach Kiddo
 * @since Teach Kiddo 1.0.0
 */

// Add sidebar section
$wp_customize->add_section( 'teach_kiddo_menu', array(
	'title'             => esc_html__('Header Menu','teach-kiddo'),
	'description'       => esc_html__( 'Header Menu options.', 'teach-kiddo' ),
	'panel'             => 'nav_menus',
) );


$wp_customize->add_setting( 'teach_kiddo_theme_options[menu_btn_title]', array(
	'sanitize_callback' => 'sanitize_text_field',
	'default'			=> $options['menu_btn_title'],
	'transport'			=> 'postMessage',
	) );

$wp_customize->add_control( 'teach_kiddo_theme_options[menu_btn_title]', array(
	'label'           	=> esc_html__( 'Sub Title', 'teach-kiddo' ),
	'section'        	=> 'teach_kiddo_menu',
	'type'				=> 'text',
	) );

if ( isset( $wp_customize->selective_refresh ) ) {
	$wp_customize->selective_refresh->add_partial( 'teach_kiddo_theme_options[menu_btn_title]', array(
		'selector'            => '#primary-menu .custom-button',
		'settings'            => 'teach_kiddo_theme_options[menu_btn_title]',
		'container_inclusive' => false,
		'fallback_refresh'    => true,
		'render_callback'     => 'teach_kiddo_menu_btn_title_partial',
		) );
}

$wp_customize->add_setting( 'teach_kiddo_theme_options[menu_btn_url]', array(
	'sanitize_callback' => 'esc_url_raw',
	'default'			=>  $options['menu_btn_url'],
	) );

$wp_customize->add_control( 'teach_kiddo_theme_options[menu_btn_url]', array(
	'label'           	=> esc_html__( 'Btn Url', 'teach-kiddo' ),
	'section'        	=> 'teach_kiddo_menu',
	'type'				=> 'url',
	) );