<?php
/**
 * Register Theme Colors section, Settings and controls for Theme Customizer
 *
 */
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
// Add Theme Colors Settings
add_action( 'customize_register', 'pmthemes_customize_register_color_settings' );
function pmthemes_customize_register_color_settings( $wp_customize ) {
    // Get defaults
    $theme_def = pmthemes_default_options();
    // General Colors Sub-section
	$wp_customize->add_section( 'pmthemes_general_colors', array(
        'title'    => __( 'General Colors', 'pmthemes' ),
        'priority' => 2,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Header Colors Sub-section
	$wp_customize->add_section( 'pmthemes_header_colors', array(
        'title'    => __( 'Header Colors', 'pmthemes' ),
        'priority' => 4,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Top Menu Colors Sub-section
	$wp_customize->add_section( 'pmthemes_navi_tops', array(
        'title'    => __( 'Top Menu Colors', 'pmthemes' ),
        'priority' => 6,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Main Menu Colors Sub-section
	$wp_customize->add_section( 'pmthemes_navi_colors', array(
        'title'    => __( 'Main Menu Colors', 'pmthemes' ),
        'priority' => 8,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Front Page Colors Sub-section
    $wp_customize->add_section( 'pmthemes_homepage_colors', array(
            'title'    => __( 'Front Page Colors', 'pmthemes' ),
            'priority' => 10,
            'panel' => 'pmthemes_colors_panel'
        )
    );
    // Sidebar & Widgets Colors Sub-section
	$wp_customize->add_section( 'pmthemes_sidebar_colors', array(
        'title'    => __( 'Sidebar & Widgets', 'pmthemes' ),
        'priority' => 12,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Footer Widgets Colors Sub-section
	$wp_customize->add_section( 'pmthemes_footwgts_colors', array(
        'title'    => __( 'Footer Widgets Colors', 'pmthemes' ),
        'priority' => 14,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    // Footer Colors Sub-section
	$wp_customize->add_section( 'pmthemes_footer_colors', array(
        'title'    => __( 'Footer Colors', 'pmthemes' ),
        'priority' => 16,
		'panel' => 'pmthemes_colors_panel' 
		)
	);
    //============ Header Colors Sub-section =========
    // Default Text Colors
	$wp_customize->add_setting( 'pmthemes_theme_options[default_text_color]', array(
        'default'           => $theme_def['default_text_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);

	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'default_text_color', array(
			'label'      => __( 'Default Text Color', 'pmthemes' ),
			'section'    => 'pmthemes_general_colors',
			'settings'   => 'pmthemes_theme_options[default_text_color]',
		) ) 
	);
	$wp_customize->add_setting( 'pmthemes_theme_options[title_color]', array(
        'default'           => $theme_def['title_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'title_color', array(
			'label'      => __( 'Post Title Color', 'pmthemes' ),
			'section'    => 'pmthemes_general_colors',
			'settings'   => 'pmthemes_theme_options[title_color]',
		) ) 
	);
	// Link Color
	$wp_customize->add_setting( 'pmthemes_theme_options[link_color]', array(
        'default'           => $theme_def['link_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'link_color', array(
			'label'      => __( 'Link Color', 'pmthemes' ),
			'section'    => 'pmthemes_general_colors',
			'settings'   => 'pmthemes_theme_options[link_color]',
		) ) 
	);
    // Body Borders
    $wp_customize->add_setting( 'pmthemes_theme_options[body_borders_color]', array(
            'default'           => $theme_def['body_borders_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'body_borders_color', array(
            'label'      => __( 'Body Borders', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[body_borders_color]',
            'active_callback' => 'pmthemes_wide_header_active',
        ) )
    );
    // Header => Comment Button
    $wp_customize->add_setting( 'pmthemes_theme_options[comment_btn_hd]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_comment_btn_hd', array(
                'label' => __( 'Comment Submit Button', 'pmthemes' ),
                'section' => 'pmthemes_general_colors',
                'settings' => 'pmthemes_theme_options[comment_btn_hd]',
                'active_callback' => 'pmthemes_comment_btn_active',
            )
        )
    );
    // Comment Button Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[cmbtn_bg_color]', array(
            'default'           => $theme_def['cmbtn_bg_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'cmbtn_bg_color', array(
            'label'      => __( 'Comment Button Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[cmbtn_bg_color]',
            'active_callback' => 'pmthemes_comment_btn_active',
        ) )
    );
    // Comment Button Text Color
    $wp_customize->add_setting( 'pmthemes_theme_options[cmbtn_text_color]', array(
            'default'           => $theme_def['cmbtn_text_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'cmbtn_text_color', array(
            'label'      => __( 'Text Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[cmbtn_text_color]',
            'active_callback' => 'pmthemes_comment_btn_active',
        ) )
    );
    // Comment Button Hover Color
    $wp_customize->add_setting( 'pmthemes_theme_options[cmbtn_btn_hover]', array(
            'default'           => $theme_def['cmbtn_btn_hover'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'cmbtn_btn_hover', array(
            'label'      => __( 'Button Hover Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[cmbtn_btn_hover]',
            'active_callback' => 'pmthemes_comment_btn_active',
        ) )
    );
    // Header => Scroll to Top Button
    $wp_customize->add_setting( 'pmthemes_theme_options[sctop_bg_hd]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_sctop_bg_hd', array(
                'label' => __( 'Scroll to Top', 'pmthemes' ),
                'section' => 'pmthemes_general_colors',
                'settings' => 'pmthemes_theme_options[sctop_bg_hd]',
                'active_callback' => 'pmthemes_scroll_top_active',
            )
        )
    );
    // Scroll to Top Button Background Color
	$wp_customize->add_setting( 'pmthemes_theme_options[sctop_bg_color]', array(
        'default'           => $theme_def['sctop_bg_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'sctop_bg_color', array(
			'label'      => __( 'Button Color', 'pmthemes' ),
			'section'    => 'pmthemes_general_colors',
			'settings'   => 'pmthemes_theme_options[sctop_bg_color]',
            'active_callback' => 'pmthemes_scroll_top_active',
		) ) 
	);
    // Scroll to Top Button Arrow Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sctop_arrow_color]', array(
            'default'           => $theme_def['sctop_arrow_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sctop_arrow_color', array(
            'label'      => __( 'Arrow Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[sctop_arrow_color]',
            'active_callback' => 'pmthemes_scroll_top_active',
        ) )
    );
    // Scroll to Top Button Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sctop_brdr_color]', array(
            'default'           => $theme_def['sctop_brdr_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sctop_brdr_color', array(
            'label'      => __( 'Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[sctop_brdr_color]',
            'active_callback' => 'pmthemes_scroll_top_active',
        ) )
    );
    // Scroll to Top Button Hover Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sctop_hover_color]', array(
            'default'           => $theme_def['sctop_hover_color'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sctop_hover_color', array(
            'label'      => __( 'Hover Color', 'pmthemes' ),
            'section'    => 'pmthemes_general_colors',
            'settings'   => 'pmthemes_theme_options[sctop_hover_color]',
            'active_callback' => 'pmthemes_scroll_top_active',
        ) )
    );
    //================== Header Colors Sub-section ====================
    // Site Title Color
	$wp_customize->add_setting( 'pmthemes_theme_options[site_title_color]', array(
        'default'           => $theme_def['site_title_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'site_title_color', array(
			'label'      => __( 'Site Title Color', 'pmthemes' ),
			'section'    => 'pmthemes_header_colors',
			'settings'   => 'pmthemes_theme_options[site_title_color]',
			'priority' => 2,
		) ) 
	);
	// Site Title Shadow
    $wp_customize->add_setting( 'pmthemes_theme_options[site_title_shadow]', array(
            'default'           => $theme_def['site_title_shadow'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'site_title_shadow', array(
            'label'      => __( 'Site Title Shadow', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[site_title_shadow]',
            'active_callback' => 'pmthemes_site_title_shadow_active',
            'priority' => 3,
        ) )
    );
    // Enable Site Title Shadow
    $wp_customize->add_setting( 'pmthemes_theme_options[site_title_shadis]', array(
            'default'           => $theme_def['site_title_shadis'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_site_title_shadis', array(
            'label'    => __( 'Enable Site Title Shadow', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[site_title_shadis]',
            'type'     => 'checkbox',
            'priority' => 4,
        )
    );
    $wp_customize->add_setting( 'pmthemes_theme_options[site_tagline_color]', array(
            'default'           => $theme_def['site_tagline_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'site_tagline_color', array(
			'label'      => __( 'Tagline Color', 'pmthemes' ),
			'section'    => 'pmthemes_header_colors',
			'settings'   => 'pmthemes_theme_options[site_tagline_color]',
            'active_callback' => 'pmthemes_site_tagline_active',
			'priority' => 5,
		) ) 
	);
    // Header Background Title
    $wp_customize->add_setting( 'pmthemes_theme_options[header_background_title]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_header_background_title', array(
                'label' => __( 'Header Background', 'pmthemes' ),
                'section' => 'pmthemes_header_colors',
                'settings' => 'pmthemes_theme_options[header_background_title]',
                'priority' => 6,
            )
        )
    );
    // Header Background Color
	$wp_customize->add_setting( 'pmthemes_theme_options[header_backgr]', array(
        'default'           => $theme_def['header_backgr'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control(
		$wp_customize, 'header_backgr', array(
			'label'      => __( 'Header Background Color', 'pmthemes' ),
			'section'    => 'pmthemes_header_colors',
			'settings'   => 'pmthemes_theme_options[header_backgr]',
			'priority' => 7,
		) ) 
	);
    // Enable Gradient Color
    $wp_customize->add_setting( 'pmthemes_theme_options[header_gradient_enable]', array(
            'default'           => $theme_def['header_gradient_enable'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_header_gradient_enable', array(
            'label'    => __( 'Apply a Gradient Color?', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_gradient_enable]',
            'type'     => 'checkbox',
            'priority' => 8,
        )
    );
    // Header Background Gradient Color
    $wp_customize->add_setting( 'pmthemes_theme_options[header_grad_ient]', array(
            'default'           => $theme_def['header_grad_ient'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'header_grad_ient', array(
            'label'      => __( 'Header Bg Gradient Effect', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[header_grad_ient]',
            'active_callback' => 'pmthemes_header_gradient_active',
            'priority' => 9,
        ) )
    );
    // Header Gradient Direction
    $wp_customize->add_setting( 'pmthemes_theme_options[header_gr_dir]', array(
            'default'           => $theme_def['header_gr_dir'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_gradient_direction'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_header_gr_dir', array(
            'label'    => __( 'Gradient Direction', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_gr_dir]',
            'active_callback' =>'pmthemes_header_gradient_active',
            'priority' => 10,
            'type'     => 'select',
            'choices'  => pmthemes_grad_direction(),
        )
    );
    // Header Top Border Title
    $wp_customize->add_setting( 'pmthemes_theme_options[header_top_border_title]', array(
            'default'           => '',
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_header_top_border_title', array(
                'label' => __( 'Header Top Border', 'pmthemes' ),
                'section' => 'pmthemes_header_colors',
                'settings' => 'pmthemes_theme_options[header_top_border_title]',
                'priority' => 11,
            )
        )
    );
    // Enable Header Top Border Settings
    $wp_customize->add_setting( 'pmthemes_theme_options[header_top_border_enable]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_header_top_border_enable', array(
            'label'    => __( 'Enable Header Top Border', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_top_border_enable]',
            'type'     => 'checkbox',
            'priority' => 12,
        )
    );
    // Header Top Border Color
	$wp_customize->add_setting( 'pmthemes_theme_options[header_topbo]', array(
        'default'           => $theme_def['header_topbo'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'header_topbo', array(
			'label'      => __( 'Header Top Border', 'pmthemes' ),
			'section'    => 'pmthemes_header_colors',
			'settings'   => 'pmthemes_theme_options[header_topbo]',
            'active_callback' => 'pmthemes_header_top_border_active',
			'priority' => 13,
		) ) 
	);
    // Header Top Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[header_topbo_height]', array(
            'default'           => $theme_def['header_topbo_height'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_header_topbo_height', array(
            'label'    => __( 'Header Top Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_topbo_height]',
            'active_callback' => 'pmthemes_header_top_border_active',
            'priority' => 14,
            'min' => 0,
            'max' => 30,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Header Bottom Border Title
    $wp_customize->add_setting( 'pmthemes_theme_options[header_bottom_border_title]', array(
            'default'           => '',
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_header_bottom_border_title', array(
                'label' => __( 'Header Bottom Border', 'pmthemes' ),
                'section' => 'pmthemes_header_colors',
                'settings' => 'pmthemes_theme_options[header_bottom_border_title]',
                'priority' => 15,
            )
        )
    );
    // Enable Header Bottom Border Settings
    $wp_customize->add_setting( 'pmthemes_theme_options[header_bottom_border_enable]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_header_bottom_border_enable', array(
            'label'    => __( 'Enable Header Bottom Border', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_bottom_border_enable]',
            'type'     => 'checkbox',
            'priority' => 16,
        )
    );
    // Header Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[header_bottom_border]', array(
            'default'           => $theme_def['header_bottom_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'header_bottom_border', array(
            'label'      => __( 'Header Bottom Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[header_bottom_border]',
            'active_callback' => 'pmthemes_header_bottom_border_active',
            'priority' => 17,
        ) )
    );
    // Header Bottom Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[header_bottom_bor_height]', array(
            'default'           => $theme_def['header_bottom_bor_height'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_header_bottom_bor_height', array(
            'label'    => __( 'Header Bottom Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[header_bottom_bor_height]',
            'active_callback' => 'pmthemes_header_bottom_border_active',
            'priority' => 18,
            'min' => 0,
            'max' => 25,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Header Line Title
    $wp_customize->add_setting( 'pmthemes_theme_options[header_line_title]', array(
            'default'           => '',
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_header_line_title', array(
                'label' => __( 'Header Line', 'pmthemes' ),
                'section' => 'pmthemes_header_colors',
                'settings' => 'pmthemes_theme_options[header_line_title]',
                'active_callback' =>'pmthemes_header_line_active',
                'priority' => 19,
            )
        )
    );
    // Header Line Top Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[headline_top_border]', array(
            'default'           => $theme_def['headline_top_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'headline_top_border', array(
            'label'      => __( 'Header Line Top Border', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[headline_top_border]',
            'active_callback' =>'pmthemes_header_line_active',
            'priority' => 21,
        ) )
    );
    // Header Line Top Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[headline_top_bor_height]', array(
            'default'           => $theme_def['headline_top_bor_height'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_headline_top_bor_height', array(
            'label'    => __( 'Header Line Top Color', 'pmthemes' ),
            'section'  => 'pmthemes_header_colors',
            'settings' => 'pmthemes_theme_options[headline_top_bor_height]',
            'active_callback' => 'pmthemes_header_line_active',
            'priority' => 22,
            'min' => 0,
            'max' => 25,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Header Line Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[headline_bottom_border]', array(
            'default'           => $theme_def['headline_bottom_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'headline_bottom_border', array(
            'label'      => __( 'Header Line Bottom Border ', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[headline_bottom_border]',
            'active_callback' =>'pmthemes_header_line_active',
            'priority' => 23,
        ) )
    );
    // Top Bar Title
    $wp_customize->add_setting( 'pmthemes_theme_options[top_bar_title]', array(
            'default'           => '',
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_top_bar_title', array(
                'label' => __( 'Top Bar Coloring', 'pmthemes' ),
                'section' => 'pmthemes_header_colors',
                'settings' => 'pmthemes_theme_options[top_bar_title]',
                'active_callback' =>'pmthemes_top_bar_active',
                'priority' => 24,
            )
        )
    );
    // Top Bar Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[top_bar_bg]', array(
            'default'           => $theme_def['top_bar_bg'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'top_bar_bg', array(
            'label'      => __( 'Top Bar Background', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[top_bar_bg]',
            'active_callback' =>'pmthemes_top_bar_active',
            'priority' => 25,
        ) )
    );
    // Top Bar Top Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[top_bar_top_border]', array(
            'default'           => $theme_def['top_bar_top_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'top_bar_top_border', array(
            'label'      => __( 'Top Bar Top Border', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[top_bar_top_border]',
            'active_callback' =>'pmthemes_top_bar_active',
            'priority' => 26,
        ) )
    );
    // Top Bar Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[top_bar_bottom_border]', array(
            'default'           => $theme_def['top_bar_bottom_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'top_bar_bottom_border', array(
            'label'      => __( 'Top Bar Bottom Border', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[top_bar_bottom_border]',
            'active_callback' =>'pmthemes_top_bar_active',
            'priority' => 27,
        ) )
    );
    // Top Bar Font Color
    $wp_customize->add_setting( 'pmthemes_theme_options[top_bar_font_color]', array(
            'default'           => $theme_def['top_bar_font_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'top_bar_font_color', array(
            'label'      => __( 'Top Bar Font Color', 'pmthemes' ),
            'section'    => 'pmthemes_header_colors',
            'settings'   => 'pmthemes_theme_options[top_bar_font_color]',
            'active_callback' =>'pmthemes_top_bar_active',
            'priority' => 28,
        ) )
    );
    //============= Top Menu Colors Sub-section =====================
    // Top Menu Text Color
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_text_color]', array(
        'default'           => $theme_def['gen_nav_font_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_text_color', array(
			'label'      => __( 'Text Color', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_text_color]',
			'priority' => 2,
		) ) 
	);
	// Top Menu Background
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_color]', array(
        'default'           => $theme_def['topnav_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_color', array(
			'label'      => __( 'Menu Background', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_color]',
			'priority' => 4,
		) ) 
	);
    // Top Menu Current Page Indicator
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_current]', array(
        'default'           => $theme_def['topnav_current'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_current', array(
			'label'      => __( 'Current Page Indicator', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_current]',
			'priority' => 6,
		) ) 
	);
    // Top Menu Mouse Hover
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_hover]', array(
        'default'           => $theme_def['topnav_hover'],
		'type'           	=> 'option',
        'transport'         => 'refresh',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_hover', array(
			'label'      => __( 'Mouse Hover', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_hover]',
			'priority' => 8,
		) ) 
	);
    // Top Menu Dropdown Header
    $wp_customize->add_setting( 'pmthemes_theme_options[top_mnu_drpd_hd]', array(
            'default'           => '',
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_top_mnu_drpd_hd', array(
                'label' => __( 'Top Menu Dropdown', 'pmthemes' ),
                'section' => 'pmthemes_navi_tops',
                'settings' => 'pmthemes_theme_options[top_mnu_drpd_hd]',
            )
        )
    );
    // Top Menu Dropdown Menu
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_dropdown]', array(
        'default'           => $theme_def['topnav_dropdown'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_dropdown', array(
			'label'      => __( 'Dropdown Menu', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_dropdown]',
			'priority' => 10,
		) ) 
	);
    // Top Menu Dropdown Hover
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_drophov]', array(
        'default'           => $theme_def['topnav_drophov'],
		'type'           	=> 'option',
        'transport'         => 'refresh',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_drophov', array(
			'label'      => __( 'Dropdown Hover', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_drophov]',
			'priority' => 12,
		) ) 
	);
    // Top Menu Dropdown Borders
	$wp_customize->add_setting( 'pmthemes_theme_options[topnav_dropbor]', array(
        'default'           => $theme_def['topnav_dropbor'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'topnav_dropbor', array(
			'label'      => __( 'Dropdown Borders', 'pmthemes' ),
			'section'    => 'pmthemes_navi_tops',
			'settings'   => 'pmthemes_theme_options[topnav_dropbor]',
			'priority' => 14,
		) ) 
	);
    //============> Main Menu Colors <============//
	$wp_customize->add_setting( 'pmthemes_theme_options[navi_text_color]', array(
        'default'           => $theme_def['gen_nav_font_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_text_color', array(
			'label'      => __( 'Menu Text Color', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_text_color]',
		) ) 
	);
	// Menu Background
	$wp_customize->add_setting( 'pmthemes_theme_options[navi_color]', array(
        'default'           => $theme_def['navi_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_color', array(
			'label'      => __( 'Menu Background', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_color]',
		) ) 
	);
    // Mouse Hover
	$wp_customize->add_setting( 'pmthemes_theme_options[navi_hover]', array(
        'default'           => $theme_def['navi_hover'],
		'type'           	=> 'option',
        'transport'         => 'refresh',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_hover', array(
			'label'      => __( 'Mouse Hover', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_hover]',
		) ) 
	);
    //===== Menu Borders Header ======
    $wp_customize->add_setting( 'pmthemes_theme_options[menu_borders]', array(
            'default'           => '',
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_menu_borders', array(
                'label' => __( 'Menu Borders', 'pmthemes' ),
                'section' => 'pmthemes_navi_colors',
                'settings' => 'pmthemes_theme_options[menu_borders]',
            )
        )
    );
    // Enable Main Menu TOP Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_top_bd_enb]', array(
            'default'           => $theme_def['navi_top_bd_enb'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_navi_top_bd_enb', array(
            'label'    => __( 'Enable Top Border', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_top_bd_enb]',
            'type'     => 'checkbox',
        )
    );
    // Main Menu TOP Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_top_bd_clr]', array(
            'default'           => $theme_def['navi_top_bd_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'navi_top_bd_clr', array(
            'label'      => __( 'Top Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_navi_colors',
            'settings'   => 'pmthemes_theme_options[navi_top_bd_clr]',
            'active_callback' =>'pmthemes_navi_top_bd_clr_enabled',
        ) )
    );
    // Main Menu TOP Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_top_bd_hei]', array(
            'default'           => $theme_def['navi_top_bd_hei'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_number'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_navi_top_bd_hei', array(
            'label'    => __( 'Top Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_top_bd_hei]',
            'active_callback' => 'pmthemes_navi_top_bd_clr_enabled',
            'min' => 0,
            'max' => 15,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Enable Main Menu Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_bot_bd_enb]', array(
            'default'           => $theme_def['navi_bot_bd_enb'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_navi_bot_bd_enb', array(
            'label'    => __( 'Enable Bottom Border', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_bot_bd_enb]',
            'type'     => 'checkbox',
        )
    );
    // Main Menu Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_bot_bd_clr]', array(
            'default'           => $theme_def['navi_bot_bd_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'navi_bot_bd_clr', array(
            'label'      => __( 'Bottom Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_navi_colors',
            'settings'   => 'pmthemes_theme_options[navi_bot_bd_clr]',
            'active_callback' =>'pmthemes_navi_bot_bd_clr_enabled',
        ) )
    );
    // Main Menu Bottom Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_bot_bd_hei]', array(
            'default'           => $theme_def['navi_bot_bd_hei'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_number'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_navi_bot_bd_hei', array(
            'label'    => __( 'Bottom Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_bot_bd_hei]',
            'active_callback' => 'pmthemes_navi_bot_bd_clr_enabled',
            'min' => 0,
            'max' => 15,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Enable Item Border
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_border_enable]', array(
            'default'           => $theme_def['navi_border_enable'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_navi_border_enable', array(
            'label'    => __( 'Enable Item Border', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_border_enable]',
            'type'     => 'checkbox',
        )
    );
    // Item Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_border]', array(
            'default'           => $theme_def['navi_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'navi_border', array(
            'label'      => __( 'Item Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_navi_colors',
            'settings'   => 'pmthemes_theme_options[navi_border]',
            'active_callback' =>'pmthemes_navi_item_border_enabled',
        ) )
    );
    // Dropdown Menus
    $wp_customize->add_setting( 'pmthemes_theme_options[dropdown_menus]', array(
            'default'           => '',
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_dropdown_menus', array(
                'label' => __( 'Dropdown Menu', 'pmthemes' ),
                'section' => 'pmthemes_navi_colors',
                'settings' => 'pmthemes_theme_options[dropdown_menus]',
            )
        )
    );
	// Dropdown Menu Color
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_dropdown]', array(
            'default'           => $theme_def['navi_dropdown'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_dropdown', array(
			'label'      => __( 'Dropdown Color', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_dropdown]',
		) ) 
	);
	// Dropdown Hover
	$wp_customize->add_setting( 'pmthemes_theme_options[navi_drophov]', array(
        'default'           => $theme_def['navi_drophov'],
		'type'           	=> 'option',
        'transport'         => 'refresh',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_drophov', array(
			'label'      => __( 'Dropdown Hover', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_drophov]',
		) ) 
	);
    // Hide Dropdown Borders
    $wp_customize->add_setting( 'pmthemes_theme_options[navi_dropdown_noborder]', array(
            'default'           => $theme_def['navi_dropdown_noborder'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_navi_dropdown_noborder', array(
            'label'    => __( 'Hide Dropdown Borders', 'pmthemes' ),
            'section'  => 'pmthemes_navi_colors',
            'settings' => 'pmthemes_theme_options[navi_dropdown_noborder]',
            'type'     => 'checkbox',
        )
    );
	// Dropdown Borders
	$wp_customize->add_setting( 'pmthemes_theme_options[navi_dropdown_border]', array(
        'default'           => $theme_def['navi_dropdown_border'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'navi_dropdown_border', array(
			'label'      => __( 'Dropdown Borders', 'pmthemes' ),
			'section'    => 'pmthemes_navi_colors',
			'settings'   => 'pmthemes_theme_options[navi_dropdown_border]',
            'active_callback' =>'pmthemes_dropdown_border_enabled',
		) ) 
	);
    //========== Front Page Colors Sub-section =============//
    // Slider Colors Header
    $wp_customize->add_setting( 'pmthemes_theme_options[slider_clrs_hd]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_slider_clrs_hd', array(
                'label' => __( 'Slider Colors', 'pmthemes' ),
                'section' => 'pmthemes_homepage_colors',
                'settings' => 'pmthemes_theme_options[slider_clrs_hd]',
                'active_callback' =>'pmthemes_post_slider_active',
            )
        )
    );
    // Caption Title Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_title_clr]', array(
            'default'           => $theme_def['sldr_title_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_title_clr', array(
            'label'      => __( 'Caption Title Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_title_clr]',
            'active_callback' =>'pmthemes_post_slider_active',
        ) )
    );

    // Caption Text Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_text_clr]', array(
            'default'           => $theme_def['sldr_text_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_text_clr', array(
            'label'      => __( 'Caption Text Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_text_clr]',
            'active_callback'   => function( $control ) {// Use two active_callbacks
                return (pmthemes_post_slider_active() && pmthemes_show_slider_content_active());
            },
        ) )
    );
    // Caption Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_bg_clr]', array(
            'default'           => $theme_def['sldr_bg_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_bg_clr', array(
            'label'      => __( 'Caption Background Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_bg_clr]',
            'active_callback' =>'pmthemes_post_slider_active',
        ) )
    );
    // Slider Arrow Colors
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_arrow_clr]', array(
            'default'           => $theme_def['sldr_arrow_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_arrow_clr', array(
            'label'      => __( 'Arrow Colors', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_arrow_clr]',
            'active_callback' =>'pmthemes_post_slider_active',
        ) )
    );
    // Slider Arrow Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_arrow_bg_clr]', array(
            'default'           => $theme_def['sldr_arrow_bg_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_arrow_bg_clr', array(
            'label'      => __( 'Arrow Background Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_arrow_bg_clr]',
            'active_callback' =>'pmthemes_post_slider_active',
        ) )
    );
    // Slider Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sldr_border_clr]', array(
            'default'           => $theme_def['sldr_border_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sldr_border_clr', array(
            'label'      => __( 'Slider Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[sldr_border_clr]',
            'active_callback' =>'pmthemes_post_slider_active',
        ) )
    );
    // Frontpage Widget Header Coloring
    $wp_customize->add_setting( 'pmthemes_theme_options[frontpage_wdgt_hd]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_frontpage_wdgt_hd', array(
                'label' => __( 'Widget Header Coloring', 'pmthemes' ),
                'section' => 'pmthemes_homepage_colors',
                'settings' => 'pmthemes_theme_options[frontpage_wdgt_hd]',
            )
        )
    );
    // Frontpage Header Text Color
    $wp_customize->add_setting( 'pmthemes_theme_options[frontbar_font_clr]', array(
            'default'           => $theme_def['frontbar_font_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'frontbar_font_clr', array(
            'label'      => __( 'Header Text Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[frontbar_font_clr]',
        ) )
    );
    // Frontpage Widget Header Bg Color
    $wp_customize->add_setting( 'pmthemes_theme_options[frontbar_bg_color]', array(
            'default'           => $theme_def['frontbar_bg_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'frontbar_bg_color', array(
            'label'      => __( 'Widget Header Bg Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[frontbar_bg_color]',
        ) )
    );
    // Enable Extra Widget Header Styling
    $wp_customize->add_setting( 'pmthemes_theme_options[frontpage_header_style]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_frontpage_header_style', array(
            'label'    => __( 'Want More Header Styling?', 'pmthemes' ),
            'section'  => 'pmthemes_homepage_colors',
            'settings' => 'pmthemes_theme_options[frontpage_header_style]',
            'type'     => 'checkbox',
        )
    );
    // Widget Header Color
    $wp_customize->add_setting( 'pmthemes_theme_options[front_header_bg_color]', array(
            'default'           => $theme_def['front_header_bg_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'front_header_bg_color', array(
            'label'      => __( 'Widget Header Color', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[front_header_bg_color]',
            'active_callback' => 'pmthemes_frontpage_header_style_active',
        ) )
    );
    // Widget Header Top Border
    $wp_customize->add_setting( 'pmthemes_theme_options[front_header_top_border]', array(
            'default'           => $theme_def['front_header_top_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'front_header_top_border', array(
            'label'      => __( 'Widget Header Top Border', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[front_header_top_border]',
            'active_callback' => 'pmthemes_frontpage_header_style_active',
        ) )
    );
    // Widget Header Bottom Border
    $wp_customize->add_setting( 'pmthemes_theme_options[front_header_bot_border]', array(
            'default'           => $theme_def['front_header_bot_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'front_header_bot_border', array(
            'label'      => __( 'Widget Header Bottom Border', 'pmthemes' ),
            'section'    => 'pmthemes_homepage_colors',
            'settings'   => 'pmthemes_theme_options[front_header_bot_border]',
            'active_callback' => 'pmthemes_frontpage_header_style_active',
        ) )
    );
    // Frontpage Widget Header Adjustments
    $wp_customize->add_setting( 'pmthemes_theme_options[frontpage_wdgt_adjt]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_frontpage_wdgt_adjt', array(
                'label' => __( 'Widget Header Adjustments', 'pmthemes' ),
                'section' => 'pmthemes_homepage_colors',
                'settings' => 'pmthemes_theme_options[frontpage_wdgt_adjt]',
            )
        )
    );
    // Front Page Widget Header Font Size
    $wp_customize->add_setting( 'pmthemes_theme_options[frontbar_font_size]', array(
            'default'           => $theme_def['frontbar_font_size'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_decimal_int'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_frontbar_font_size', array(
            'label'    => __( 'Header Bar Font Size', 'pmthemes' ),
            'section'  => 'pmthemes_homepage_colors',
            'settings' => 'pmthemes_theme_options[frontbar_font_size]',
            'active_callback' => 'pmthemes_static_front_page_check',
            'min' => 0.75,
            'max' => 2.75,
            'step' => 0.01,
            'unit' => 'em',
        ))
    );
    // Frontpage Widget Header Font Padding
    $wp_customize->add_setting( 'pmthemes_theme_options[fpbar_font_pad_top]', array(
            'default' 			=> $theme_def['fpbar_font_pad_top'],
            'type' 				=> 'option',
            'transport' 		=> 'postMessage',
            'sanitize_callback' => 'absint',
        )
    );
    // Header right
    $wp_customize->add_setting( 'pmthemes_theme_options[fpbar_font_pad_right]', array(
            'default' 			=> $theme_def['fpbar_font_pad_right'],
            'type' 				=> 'option',
            'transport' 		=> 'postMessage',
            'sanitize_callback' => 'absint',
        )
    );
    // Header bottom
    $wp_customize->add_setting( 'pmthemes_theme_options[fpbar_font_pad_bottom]', array(
            'default' 			=> $theme_def['fpbar_font_pad_bottom'],
            'type' 				=> 'option',
            'transport' 		=> 'postMessage',
            'sanitize_callback' => 'absint',
        )
    );
    // Header left
    $wp_customize->add_setting( 'pmthemes_theme_options[fpbar_font_pad_left]', array(
            'default' 			=> $theme_def['fpbar_font_pad_left'],
            'type' 				=> 'option',
            'transport' 		=> 'postMessage',
            'sanitize_callback' => 'absint',
        )
    );
    // Header controls
    $wp_customize->add_control(new Pmthemes_Spacing_Control($wp_customize, 'fpbar_font_spacing', array(
                'type' => 'pmthemes-spacing',
                'label'       => esc_html__( 'Header Font Padding (px)', 'pmthemes' ),
                'section'     => 'pmthemes_homepage_colors',
                'settings'    => array(
                    'top'     => 'pmthemes_theme_options[fpbar_font_pad_top]',
                    'right'   => 'pmthemes_theme_options[fpbar_font_pad_right]',
                    'bottom'  => 'pmthemes_theme_options[fpbar_font_pad_bottom]',
                    'left'    => 'pmthemes_theme_options[fpbar_font_pad_left]',
                ),
                'element' => 'fpbar-font-padding',
            )
        )
    );
    // Post Title Header
    $wp_customize->add_setting( 'pmthemes_theme_options[frontpage_title_hd]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_frontpage_title_hd', array(
                'label' => __( 'Post Title Sizes', 'pmthemes' ),
                'section' => 'pmthemes_homepage_colors',
                'settings' => 'pmthemes_theme_options[frontpage_title_hd]',
            )
        )
    );
    // Big Posts Title Font Size
    $wp_customize->add_setting( 'pmthemes_theme_options[front_page_fonts_size]', array(
            'default'           => $theme_def['front_page_fonts_size'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_decimal_int'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_front_page_fonts_size', array(
            'label'    => __( 'Big Posts Title Font Size', 'pmthemes' ),
            'section'  => 'pmthemes_homepage_colors',
            'settings' => 'pmthemes_theme_options[front_page_fonts_size]',
            'active_callback' => 'pmthemes_static_front_page_check',
            'min' => 0.75,
            'max' => 2.55,
            'step' => 0.01,
            'unit' => 'em',
        ))
    );
    // Small Posts Title Font Size
    $wp_customize->add_setting( 'pmthemes_theme_options[front_page_font_size]', array(
            'default'           => $theme_def['front_page_font_size'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_decimal_int'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_front_page_font_size', array(
            'label'    => __( 'Small Posts Title Font Size', 'pmthemes' ),
            'section'  => 'pmthemes_homepage_colors',
            'settings' => 'pmthemes_theme_options[front_page_font_size]',
            'active_callback' => 'pmthemes_static_front_page_check',
            'min' => 0.75,
            'max' => 1.95,
            'step' => 0.01,
            'unit' => 'em',
        ))
    );
    // Single Posts Title Font Size
    $wp_customize->add_setting( 'pmthemes_theme_options[front_posts_font_size]', array(
            'default'           => $theme_def['front_posts_font_size'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'pmthemes_sanitize_decimal_int'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_front_posts_font_size', array(
            'label'    => __( 'Single Posts Title Font Size', 'pmthemes' ),
            'section'  => 'pmthemes_homepage_colors',
            'settings' => 'pmthemes_theme_options[front_posts_font_size]',
            'active_callback' => 'pmthemes_static_front_page_check',
            'min' => 0.75,
            'max' => 2.75,
            'step' => 0.01,
            'unit' => 'em',
        ))
    );
    // ================================= Sidebar Coloring ============================
    // Sidebar Background
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_background]', array(
            'default'           => $theme_def['sidebar_background'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sidebar_background', array(
            'label'      => __( 'Sidebar Background', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[sidebar_background]',
        ) )
    );
    // Enable Gradient Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_gradient_enable]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_sidebar_gradient_enable', array(
            'label'    => __( 'Apply a Gradient Color?', 'pmthemes' ),
            'section'  => 'pmthemes_sidebar_colors',
            'settings' => 'pmthemes_theme_options[sidebar_gradient_enable]',
            'type'     => 'checkbox',
        )
    );
    // Header Background Gradient Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_grad_ient]', array(
            'default'           => $theme_def['sidebar_grad_ient'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sidebar_grad_ient', array(
            'label'      => __( 'Gradient Effect', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[sidebar_grad_ient]',
            'active_callback' => 'pmthemes_sidebar_gradient_active',
        ) )
    );
    // Sidebar Gradient Direction
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_gr_dir]', array(
            'default'           => $theme_def['sidebar_gr_dir'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_gradient_direction'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_sidebar_gr_dir', array(
            'label'    => __( 'Gradient Direction', 'pmthemes' ),
            'section'  => 'pmthemes_sidebar_colors',
            'settings' => 'pmthemes_theme_options[sidebar_gr_dir]',
            'active_callback' =>'pmthemes_sidebar_gradient_active',
            'type'     => 'select',
            'choices'  => pmthemes_grad_direction(),
        )
    );
    // Widget Headers
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_headers_style]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_widget_headers_style', array(
                'label' => __( 'Widget Headers', 'pmthemes' ),
                'section' => 'pmthemes_sidebar_colors',
                'settings' => 'pmthemes_theme_options[widget_headers_style]',
            )
        )
    );
    // Widget Title Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_title_color]', array(
            'default'           => $theme_def['widget_title_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_title_color', array(
            'label'      => __( 'Widget Title Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_title_color]',
        ) )
    );
    // Widget Title Bg Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_header_color]', array(
            'default'           => $theme_def['widget_header_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_header_color', array(
            'label'      => __( 'Widget Title Bg Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_header_color]',
        ) )
    );
    // Enable Extra Widget Header Styling
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_header_styling]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_widget_header_styling', array(
            'label'    => __( 'Want More Widget Header Styling?', 'pmthemes' ),
            'section'  => 'pmthemes_sidebar_colors',
            'settings' => 'pmthemes_theme_options[widget_header_styling]',
            'type'     => 'checkbox',
        )
    );
    // Widget Header Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_header_bg_color]', array(
            'default'           => $theme_def['widget_header_bg_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_header_bg_color', array(
            'label'      => __( 'Widget Header Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_header_bg_color]',
            'active_callback' => 'pmthemes_widget_header_style_active',
        ) )
    );
    // Widget Header Top Border
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_header_top_border]', array(
            'default'           => $theme_def['widget_header_top_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_header_top_border', array(
            'label'      => __( 'Widget Header Top Border', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_header_top_border]',
            'active_callback' => 'pmthemes_widget_header_style_active',
        ) )
    );
    // Widget Header Bottom Border
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_header_bot_border]', array(
            'default'           => $theme_def['widget_header_bot_border'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_header_bot_border', array(
            'label'      => __( 'Widget Header Bottom Border', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_header_bot_border]',
            'active_callback' => 'pmthemes_widget_header_style_active',
        ) )
    );
    // Widget Content
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_content_style]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_widget_content_style', array(
                'label' => __( 'Widget Content', 'pmthemes' ),
                'section' => 'pmthemes_sidebar_colors',
                'settings' => 'pmthemes_theme_options[widget_content_style]',
            )
        )
    );
    // Widget Link Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_link_color]', array(
            'default'           => $theme_def['widget_link_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_link_color', array(
            'label'      => __( 'Widget Link Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_link_color]',
        ) )
    );
    // Widget Text Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_text_color]', array(
            'default'           => $theme_def['widget_text_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_text_color', array(
            'label'      => __( 'Widget Text Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_text_color]',
        ) )
    );
    // Widget Post Meta Color
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_post_meta_clr]', array(
            'default'           => $theme_def['widget_post_meta_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_post_meta_clr', array(
            'label'      => __( 'Widget Post Meta Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_post_meta_clr]',
        ) )
    );
    // Widget Background
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_backgr_color]', array(
            'default'           => $theme_def['widget_backgr_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'widget_backgr_color', array(
            'label'      => __( 'Widget Background', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[widget_backgr_color]',
        ) )
    );
    // Edit Sidebar Widget Borders
    $wp_customize->add_setting( 'pmthemes_theme_options[show_sidebar_border]', array(
            'default'           => $theme_def['show_sidebar_border'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_show_sidebar_border', array(
            'label'    => __( 'Edit Widget Borders?', 'pmthemes' ),
            'section'  => 'pmthemes_sidebar_colors',
            'settings' => 'pmthemes_theme_options[show_sidebar_border]',
            'type'     => 'checkbox',
        )
    );
    // Sidebar Widget Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_border_color]', array(
            'default'           => $theme_def['sidebar_border_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'sidebar_border_color', array(
            'label'      => __( 'Widget Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[sidebar_border_color]',
            'active_callback' =>'pmthemes_sidebar_border_active',
        ) )
    );
    // Sidebar Border Thickness
    $wp_customize->add_setting( 'pmthemes_theme_options[sidebar_border_thick]', array(
            'default'           => $theme_def['sidebar_border_thick'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_sidebar_border_thick', array(
            'label'    => __( 'Sidebar Border Thickness', 'pmthemes' ),
            'section'  => 'pmthemes_sidebar_colors',
            'settings' => 'pmthemes_theme_options[sidebar_border_thick]',
            'active_callback' => 'pmthemes_sidebar_border_active',
            'min' => 0,
            'max' => 10,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Tabbed Widget
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_tabbed_style]', array(
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_widget_tabbed_style', array(
                'label' => __( 'Tabbed Widget', 'pmthemes' ),
                'section' => 'pmthemes_sidebar_colors',
                'settings' => 'pmthemes_theme_options[widget_tabbed_style]',
                'active_callback' => 'pmthemes_tabbed_content_active',
            )
        )
    );
    // Tabbed Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[tabbed_bg_color]', array(
            'default'           => $theme_def['tabbed_bg_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'tabbed_bg_color', array(
            'label'      => __( 'Tabbed Background Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[tabbed_bg_color]',
            'active_callback' => 'pmthemes_tabbed_content_active',
        ) )
    );
    // Tabbed Header Color
    $wp_customize->add_setting( 'pmthemes_theme_options[tabbed_header_color]', array(
            'default'           => $theme_def['tabbed_header_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'tabbed_header_color', array(
            'label'      => __( 'Tabbed Header Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[tabbed_header_color]',
            'active_callback' => 'pmthemes_tabbed_content_active',
        ) )
    );
    // Tabbed Header Title Color
    $wp_customize->add_setting( 'pmthemes_theme_options[tabbed_hdtl_color]', array(
            'default'           => $theme_def['tabbed_hdtl_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'tabbed_hdtl_color', array(
            'label'      => __( 'Header Title Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[tabbed_hdtl_color]',
            'active_callback' => 'pmthemes_tabbed_content_active',
        ) )
    );
    // Tabbed Linked Color
    $wp_customize->add_setting( 'pmthemes_theme_options[tabbed_linked_color]', array(
            'default'           => $theme_def['tabbed_linked_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'tabbed_linked_color', array(
            'label'      => __( 'Tabbed Linked Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[tabbed_linked_color]',
            'active_callback' => 'pmthemes_tabbed_content_active',
        ) )
    );
    // Tabbed Post Meta Color
    $wp_customize->add_setting( 'pmthemes_theme_options[tabbed_post_meta_clr]', array(
            'default'           => $theme_def['tabbed_post_meta_clr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'tabbed_post_meta_clr', array(
            'label'      => __( 'Tabbed Post Meta Color', 'pmthemes' ),
            'section'    => 'pmthemes_sidebar_colors',
            'settings'   => 'pmthemes_theme_options[tabbed_post_meta_clr]',
            'active_callback' => 'pmthemes_tabbed_content_active',
        ) )
    );
    // ================================= Footer Widgets Coloring ============================
	// Footer Widget Background
	$wp_customize->add_setting( 'pmthemes_theme_options[footer_widgets_color]', array(
        'default'           => $theme_def['footer_widgets_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_widgets_color', array(
			'label'      => __( 'Footer Widget Background', 'pmthemes' ),
			'section'    => 'pmthemes_footwgts_colors',
			'settings'   => 'pmthemes_theme_options[footer_widgets_color]',
		) ) 
	);
    // Enable Gradient Color for Footer Widget
    $wp_customize->add_setting( 'pmthemes_theme_options[fwidget_gradient_enable]', array(
            'default'           => $theme_def['gen_check_no'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_checkbox'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_fwidget_gradient_enable', array(
            'label'    => __( 'Apply a Gradient Color?', 'pmthemes' ),
            'section'  => 'pmthemes_footwgts_colors',
            'settings' => 'pmthemes_theme_options[fwidget_gradient_enable]',
            'type'     => 'checkbox',
        )
    );
    // Footer Widget Background Gradient Color
    $wp_customize->add_setting( 'pmthemes_theme_options[fwidget_grad_ient]', array(
            'default'           => $theme_def['fwidget_grad_ient'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'fwidget_grad_ient', array(
            'label'      => __( 'Gradient Effect', 'pmthemes' ),
            'section'    => 'pmthemes_footwgts_colors',
            'settings'   => 'pmthemes_theme_options[fwidget_grad_ient]',
            'active_callback' => 'pmthemes_fwidget_gradient_active',
        ) )
    );
    // Footer Widgets Gradient Direction
    $wp_customize->add_setting( 'pmthemes_theme_options[fwidget_gr_dir]', array(
            'default'           => $theme_def['fwidget_gr_dir'],
            'type'           	=> 'option',
            'transport'         => 'refresh',
            'sanitize_callback' => 'pmthemes_sanitize_gradient_direction'
        )
    );
    $wp_customize->add_control( 'pmthemes_control_fwidget_gr_dir', array(
            'label'    => __( 'Gradient Direction', 'pmthemes' ),
            'section'  => 'pmthemes_footwgts_colors',
            'settings' => 'pmthemes_theme_options[fwidget_gr_dir]',
            'active_callback' =>'pmthemes_fwidget_gradient_active',
            'type'     => 'select',
            'choices'  => pmthemes_grad_direction(),
        )
    );
    // Widget Boxes Header
    $wp_customize->add_setting( 'pmthemes_theme_options[widget_bx_header]', array(
            'default'           => '',
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_widget_bx_header', array(
                'label' => __( 'Widget Boxes', 'pmthemes' ),
                'section' => 'pmthemes_footwgts_colors',
                'settings' => 'pmthemes_theme_options[widget_bx_header]',
            )
        )
    );
    // Widget Boxes Bg Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_each_widget]', array(
            'default'           => $theme_def['footer_each_widget'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'footer_each_widget', array(
            'label'      => __( 'Widget Boxes Bg Color', 'pmthemes' ),
            'section'    => 'pmthemes_footwgts_colors',
            'settings'   => 'pmthemes_theme_options[footer_each_widget]',
        ) )
    );
    // Header Background Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_widgets_header_bg]', array(
            'default'           => $theme_def['footer_widgets_header_bg'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'footer_widgets_header_bg', array(
            'label'      => __( 'Header Background', 'pmthemes' ),
            'section'    => 'pmthemes_footwgts_colors',
            'settings'   => 'pmthemes_theme_options[footer_widgets_header_bg]',
        ) )
    );
    // Header Title Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_widgets_header_title]', array(
            'default'           => $theme_def['gen_head_font_color'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'footer_widgets_header_title', array(
            'label'      => __( 'Header Title Color', 'pmthemes' ),
            'section'    => 'pmthemes_footwgts_colors',
            'settings'   => 'pmthemes_theme_options[footer_widgets_header_title]',
        ) )
    );
    // Text Link Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_widgets_texts]', array(
            'default'           => $theme_def['footer_widgets_texts'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_widgets_texts', array(
			'label'      => __( 'Text Link Color', 'pmthemes' ),
			'section'    => 'pmthemes_footwgts_colors',
			'settings'   => 'pmthemes_theme_options[footer_widgets_texts]',
		) ) 
	);
    // Plain Text Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_widgets_pltxt]', array(
            'default'           => $theme_def['footer_widgets_pltxt'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'footer_widgets_pltxt', array(
            'label'      => __( 'Plain Text Color', 'pmthemes' ),
            'section'    => 'pmthemes_footwgts_colors',
            'settings'   => 'pmthemes_theme_options[footer_widgets_pltxt]',
        ) )
    );
    // Text Link Bottom Border
	$wp_customize->add_setting( 'pmthemes_theme_options[footer_texts_borders]', array(
        'default'           => $theme_def['footer_texts_borders'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_texts_borders', array(
			'label'      => __( 'Text Link Bottom Border', 'pmthemes' ),
			'section'    => 'pmthemes_footwgts_colors',
			'settings'   => 'pmthemes_theme_options[footer_texts_borders]',
		) ) 
	);
    //================> Footer Area Coloring <====================
    // Footer Text Color
	$wp_customize->add_setting( 'pmthemes_theme_options[footer_texts_colol]', array(
        'default'           => $theme_def['footer_texts_colol'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_texts_colol', array(
			'label'      => __( 'Footer Text Color', 'pmthemes' ),
			'section'    => 'pmthemes_footer_colors',
			'settings'   => 'pmthemes_theme_options[footer_texts_colol]',
		) ) 
	);
	// Footer Background Color
	$wp_customize->add_setting( 'pmthemes_theme_options[footer_color]', array(
        'default'           => $theme_def['footer_color'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_color', array(
			'label'      => __( 'Footer Background', 'pmthemes' ),
			'section'    => 'pmthemes_footer_colors',
			'settings'   => 'pmthemes_theme_options[footer_color]',
		) ) 
	);
    // Footer Borders Header
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_bdr_header]', array(
            'default'           => '',
            'type'           	=> 'option',
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control( new Pmthemes_Customize_Header_Control(
            $wp_customize, 'pmthemes_control_footer_bdr_header', array(
                'label' => __( 'Footer Borders', 'pmthemes' ),
                'section' => 'pmthemes_footer_colors',
                'settings' => 'pmthemes_theme_options[footer_bdr_header]',
            )
        )
    );
    // Footer Top Border Color
	$wp_customize->add_setting( 'pmthemes_theme_options[footer_top_brdr]', array(
        'default'           => $theme_def['footer_top_brdr'],
		'type'           	=> 'option',
        'transport'         => 'postMessage',
        'sanitize_callback' => 'sanitize_hex_color'
		)
	);
	$wp_customize->add_control( new WP_Customize_Color_Control( 
		$wp_customize, 'footer_top_brdr', array(
			'label'      => __( 'Top Border Color', 'pmthemes' ),
			'section'    => 'pmthemes_footer_colors',
			'settings'   => 'pmthemes_theme_options[footer_top_brdr]',
		) ) 
	);

    // Footer Top Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_top_brdr_hei]', array(
            'default'           => $theme_def['footer_top_brdr_hei'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_footer_top_brdr_hei', array(
            'label'    => __( 'Top Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_footer_colors',
            'settings' => 'pmthemes_theme_options[footer_top_brdr_hei]',
            'min' => 0,
            'max' => 15,
            'step' => 1,
            'unit' => 'px',
        ))
    );
    // Footer Bottom Border Color
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_bottom_brdr]', array(
            'default'           => $theme_def['footer_bottom_brdr'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );
    $wp_customize->add_control( new WP_Customize_Color_Control(
            $wp_customize, 'footer_bottom_brdr', array(
            'label'      => __( 'Bottom Border Color', 'pmthemes' ),
            'section'    => 'pmthemes_footer_colors',
            'settings'   => 'pmthemes_theme_options[footer_bottom_brdr]',
        ) )
    );
    // Footer Bottom Border Height
    $wp_customize->add_setting( 'pmthemes_theme_options[footer_bot_brdr_hei]', array(
            'default'           => $theme_def['footer_bot_brdr_hei'],
            'type'           	=> 'option',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control( new WP_Customize_Range( $wp_customize, 'pmthemes_control_footer_bot_brdr_hei', array(
            'label'    => __( 'Bottom Border Height', 'pmthemes' ),
            'section'  => 'pmthemes_footer_colors',
            'settings' => 'pmthemes_theme_options[footer_bot_brdr_hei]',
            'min' => 0,
            'max' => 15,
            'step' => 1,
            'unit' => 'px',
        ))
    );
}