<?php
/**
 * Theme Customizer Controls
 *
 * @package Kindergarten Art School
 */

if ( ! function_exists( 'kindergarten_art_school_customizer_footer_register' ) ) :
function kindergarten_art_school_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'kindergarten_art_school_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'kindergarten-art-school' )
        )
    );

    // Title label
	$wp_customize->add_setting( 
		'kindergarten_art_school_label_footer_settings_title', 
		array(
		    'sanitize_callback' => 'kindergarten_art_school_sanitize_title',
		) 
	);

	$wp_customize->add_control( 
		new Kindergarten_Art_School_Title_Info_Control( $wp_customize, 'kindergarten_art_school_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'kindergarten-art-school' ),
		    'section'     => 'kindergarten_art_school_footer_settings',
		    'type'        => 'kindergarten-art-school-title',
		    'settings'    => 'kindergarten_art_school_label_footer_settings_title',
		) 
	));

	// Copyright text
    $wp_customize->add_setting(
        'kindergarten_art_school_footer_copyright_text',
        array(
            'type' => 'theme_mod',
            'sanitize_callback' => 'kindergarten_art_school_sanitize_textarea_field'
        )
    );

    $wp_customize->add_control(
        'kindergarten_art_school_footer_copyright_text',
        array(
            'settings'      => 'kindergarten_art_school_footer_copyright_text',
            'section'       => 'kindergarten_art_school_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'kindergarten-art-school' )
        )
    );
}
endif;

add_action( 'customize_register', 'kindergarten_art_school_customizer_footer_register' );