<?php 
/**
 * Fields For Footer options
 * @since 1.0
 * @package RoyalNews
 */

function royalnews_customizer_footer( $section ){
	$section[ 'footer_options' ] = array(
		'title'  => esc_html__( 'Footer Options', 'royalnews' ),
		'priority'    => 240,
		'fields' => array(
			'enable-widget-area' => array(
				'type' => 'toggle',
				'label' => esc_html__( 'Enable Widget Area', 'royalnews' ),
				'default' => true,
				'priority' => 10,
			),
			'footer-bg-color' => array(
				'type'        => 'color',
				'label'       => esc_html__( 'Credit Background Color', 'royalnews' ),
				'default'     => '#000000',
				'priority' => 20,
				'choices'     => array(
					'alpha' => true,
				),
				'output' => array(
				    array(
				        'element'  => '.royalnews-footer-copyright-area',
				        'property' => 'background',
				    )
				),
			),
			'footer-text-color'    => array(
			    'label' => esc_html__( 'Text Color', 'royalnews' ),
			    'type'  => 'color',
			    'default'   => '#ffffff',
			    'priority'    => 30,
			    'output' => array(
			        array(
			            'element'  => '.royalnews-footer-copyright-area .royalnews-copyright',
			            'property' => 'color',
			        )
			    ),
			),
		)
	);
	return $section;
}

add_filter( 'royalnews_customizer_theme_option_panel', 'royalnews_customizer_footer' );