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

if ( ! function_exists( 'business_article_ship_customizer_global_color_setting_register' ) ) :
function business_article_ship_customizer_global_color_setting_register( $wp_customize ) {
 
 	$wp_customize->add_section(
        'business_article_ship_global_color_settings',
        array (
            'priority'      => 40,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Global Color Settings', 'business-article-ship' )
        )
    );

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

	$wp_customize->add_control( 
		new Business_Article_Ship_Title_Info_Control( $wp_customize, 'business_article_ship_theme_color_settings', 
		array(
		    'label'       => esc_html__( 'Global Color Settings', 'business-article-ship' ),
		    'section'     => 'business_article_ship_global_color_settings',
		    'type'        => 'business-article-ship-title',
		    'settings'    => 'business_article_ship_theme_color_settings',
		) 
	));

    $wp_customize->add_setting('business_article_ship_global_color1',
        array(
            'type' => 'theme_mod',
            'default'           => '#f94c30',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );

    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'business_article_ship_global_color1',
            array(
                'label'      => esc_html__( 'Global Color1', 'business-article-ship' ),
                'section'    => 'business_article_ship_global_color_settings',
                'settings'   => 'business_article_ship_global_color1',
            )
        )
    ); 
}
endif;

add_action( 'customize_register', 'business_article_ship_customizer_global_color_setting_register' );