<?php
/**
 * Theme Customizer Controls
 *
 * @package Unique Gift Shop
 */


if ( ! function_exists( 'unique_gift_shop_customizer_footer_register' ) ) :
function unique_gift_shop_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'unique_gift_shop_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'unique-gift-shop' )
        )
    );

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

	$wp_customize->add_control( 
		new Unique_Gift_Shop_Title_Info_Control( $wp_customize, 'unique_gift_shop_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'unique-gift-shop' ),
		    'section'     => 'unique_gift_shop_footer_settings',
		    'type'        => 'unique-gift-shop-title',
		    'settings'    => 'unique_gift_shop_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'unique_gift_shop_footer_copyright_text',
        array(
            'settings'      => 'unique_gift_shop_footer_copyright_text',
            'section'       => 'unique_gift_shop_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'unique-gift-shop' )
        )
    );
}
endif;

add_action( 'customize_register', 'unique_gift_shop_customizer_footer_register' );