<?php
/**
 * Theme Customizer Controls
 *
 * @package Lawyer Consultant
 */


if ( ! function_exists( 'lawyer_consultant_customizer_footer_register' ) ) :
function lawyer_consultant_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'lawyer_consultant_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'lawyer-consultant' )
        )
    );

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

	$wp_customize->add_control( 
		new Lawyer_Consultant_Title_Info_Control( $wp_customize, 'lawyer_consultant_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'lawyer-consultant' ),
		    'section'     => 'lawyer_consultant_footer_settings',
		    'type'        => 'lawyer-consultant-title',
		    'settings'    => 'lawyer_consultant_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'lawyer_consultant_footer_copyright_text',
        array(
            'settings'      => 'lawyer_consultant_footer_copyright_text',
            'section'       => 'lawyer_consultant_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'lawyer-consultant' )
        )
    );
}
endif;

add_action( 'customize_register', 'lawyer_consultant_customizer_footer_register' );