<?php
add_action( 'customize_register', 'is_medify_customizer' );
function is_medify_customizer( $wp_customize ) {
	
	/* Genral section */
	$wp_customize->add_panel( 'is_medify_theme_option', array('title' => __( 'Theme Options','is_medify' ), 'priority' => 1) );




	// Footer Section
	$wp_customize->add_section('footer_section',array(
	'title'=>__("Footer Options",'is_medify'),
	'panel'=>'is_medify_theme_option',
	'capability'=>'edit_theme_options',
    'priority' => 35
	));	
	$wp_customize->add_setting(
            'is_medify_footer_section_areas',
            array(
                'type'=>'theme_mod',
				'default'=>'1',
				'sanitize_callback' => 'is_medify_sanitize_checkbox',
            )
       );
	   $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize,
                'is_medify_footer_section_areas',
                array(
                    'label'           => esc_html__( 'Enable Footer Widget Area', 'is_medify' ),
                    'type'            => 'checkbox',
                    'section'         => 'footer_section',
                    'settings'        => 'is_medify_footer_section_areas',
                    'priority'        => 1,
                )
            )
        );
	

}

function is_medify_sanitize_text( $input ) {
    return wp_kses_post( force_balance_tags( $input ) );
}
function is_medify_sanitize_checkbox( $input ) {
   if ( $input == 1 ) {
        return 'on' ;
    } else {
        return 'off';
    }
}
function is_medify_sanitize_integer( $input ) {
    return (int)($input);
}