<?php
function flossy_footer( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	// Footer Panel // 
	$wp_customize->add_panel( 
		'footer_section', 
		array(
			'priority'      => 34,
			'capability'    => 'edit_theme_options',
			'title'			=> __('Footer', 'flossy'),
		) 
	);
	
	// Footer Setting Section // 
	$wp_customize->add_section(
        'footer_copy_Section',
        array(
            'title' 		=> __('Below Footer','flossy'),
			'panel'  		=> 'footer_section',
			'priority'      => 4,
		)
    );

	$flossy_copyright = esc_html__('Copyright &copy; [current_year] | Powered by [theme_author]', 'flossy' );
	
	//  Title // 
	$wp_customize->add_setting(
    	'footer_first_custom',
    	array(
	        'default'			=> $flossy_copyright,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'flossy_sanitize_html',
			'transport'         => $selective_refresh,
		)
	);	
	
	$wp_customize->add_control( 
		'footer_first_custom',
		array(
		    'label'   => __('Copyright','flossy'),
		    'section' => 'footer_copy_Section',
			'type'           => 'textarea',
		)  
	);
	
	
}
add_action( 'customize_register', 'flossy_footer' );