<?php
/**
 * Theme Customizer Controls
 *
 * @package Jungle Eco Tours
 */

if ( ! function_exists( 'jungle_eco_tours_customizer_footer_register' ) ) :
function jungle_eco_tours_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'jungle_eco_tours_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'jungle-eco-tours' )
        )
    );

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

	$wp_customize->add_control( 
		new Jungle_Eco_Tours_Title_Info_Control( $wp_customize, 'jungle_eco_tours_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'jungle-eco-tours' ),
		    'section'     => 'jungle_eco_tours_footer_settings',
		    'type'        => 'jungle-eco-tours-title',
		    'settings'    => 'jungle_eco_tours_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'jungle_eco_tours_footer_copyright_text',
        array(
            'settings'      => 'jungle_eco_tours_footer_copyright_text',
            'section'       => 'jungle_eco_tours_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'jungle-eco-tours' )
        )
    );
}
endif;

add_action( 'customize_register', 'jungle_eco_tours_customizer_footer_register' );