<?php
/**
 * Theme Customizer Controls
 *
 * @package Home Shifting Services
 */

if ( ! function_exists( 'home_shifting_services_customizer_footer_register' ) ) :
function home_shifting_services_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'home_shifting_services_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'home-shifting-services' )
        )
    );

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

	$wp_customize->add_control( 
		new Home_Shifting_Services_Title_Info_Control( $wp_customize, 'home_shifting_services_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'home-shifting-services' ),
		    'section'     => 'home_shifting_services_footer_settings',
		    'type'        => 'home-shifting-services-title',
		    'settings'    => 'home_shifting_services_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'home_shifting_services_footer_copyright_text',
        array(
            'settings'      => 'home_shifting_services_footer_copyright_text',
            'section'       => 'home_shifting_services_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'home-shifting-services' )
        )
    );
}
endif;

add_action( 'customize_register', 'home_shifting_services_customizer_footer_register' );