<?php
/**
 * Theme Customizer Controls
 *
 * @package Quantic
 */


if ( ! function_exists( 'quantic_customizer_footer_register' ) ) :
function quantic_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'quantic_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'quantic' )
        )
    );

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

	$wp_customize->add_control( 
		new Quantic_Title_Info_Control( $wp_customize, 'quantic_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'quantic' ),
		    'section'     => 'quantic_footer_settings',
		    'type'        => 'quantic-title',
		    'settings'    => 'quantic_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'quantic_footer_copyright_text',
        array(
            'settings'      => 'quantic_footer_copyright_text',
            'section'       => 'quantic_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'quantic' )
        )
    );
}
endif;

add_action( 'customize_register', 'quantic_customizer_footer_register' );