<?php
/**
 * Theme Customizer Controls
 *
 * @package Business Article Ship
 */


if ( ! function_exists( 'business_article_ship_customizer_footer_register' ) ) :
function business_article_ship_customizer_footer_register( $wp_customize ) {
 	
 	$wp_customize->add_section(
        'business_article_ship_footer_settings',
        array (
            'priority'      => 30,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Footer Settings', 'business-article-ship' )
        )
    );

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

	$wp_customize->add_control( 
		new Business_Article_Ship_Title_Info_Control( $wp_customize, 'business_article_ship_label_footer_settings_title', 
		array(
		    'label'       => esc_html__( 'Footer Settings', 'business-article-ship' ),
		    'section'     => 'business_article_ship_footer_settings',
		    'type'        => 'business-article-ship-title',
		    'settings'    => 'business_article_ship_label_footer_settings_title',
		) 
	));

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

    $wp_customize->add_control(
        'business_article_ship_footer_copyright_text',
        array(
            'settings'      => 'business_article_ship_footer_copyright_text',
            'section'       => 'business_article_ship_footer_settings',
            'type'          => 'textarea',
            'label'         => esc_html__( 'Footer Copyright Text', 'business-article-ship' )
        )
    );
}
endif;

add_action( 'customize_register', 'business_article_ship_customizer_footer_register' );