<?php 
/**
 * Reset Option
 * @since 1.1
 * @package RoyalNews
 */

function royalnews_customizer_reset_option( $section ){
	$section[ 'reset_options' ] = array(
		'title' => esc_html__( 'Reset', 'royalnews' ),
		'priority'    => 260,
		'fields' => array(
			'customizer-reset' => array(
			    'type' => 'custom',
			    'description' => esc_html__( 'Once value are reset, it can not be reverted to original value.', 'royalnews' ),
			    'default' => sprintf( '<button 
			    	class="royalnews-reset-customizer" 
			    	data-nonce="%s" 
			    	data-msg="%s"
			        style="background: #d82926;border-color: #d82926;color: #fff;text-decoration: none;text-shadow: none;padding: 10px 20px;border-radius: 4px;border:none;cursor:pointer;width:275px"
			        >
			            <span class="dashicons dashicons-image-rotate" style="margin-right: 5px;font-size: 16px;padding-top: 4px;"></span>%s
			        </button>',
			        wp_create_nonce('royalnews-reset-nonce'),
			        esc_html__( 'Are You Sure?', 'royalnews' ),
			        esc_html__( 'Reset', 'royalnews' )
			    )
			)
		)
	);
	return $section;
}

add_filter( 'royalnews_customizer_theme_option_panel', 'royalnews_customizer_reset_option' );