<?php
function coupon_flash_deals_premium_setting( $wp_customize ) {
	
	/*=========================================
	Page Layout Settings Section
	=========================================*/
	$wp_customize->add_section(
        'upgrade_premium',
        array(
            'title' 		=> __('Upgrade to Pro','coupon-flash-deals'),
			'priority'      => 1,
		)
    );
	
	/*=========================================
	Add Buttons
	=========================================*/
	
	class Coupon_Flash_Deals_WP_Button_Customize_Control extends WP_Customize_Control {
	public $type = 'upgrade_premium';

function render_content() {
		?>
			<div class="premium_info">
				<ul>
					<li><a class="upgrade-to-pro" href="<?php echo esc_url( 'https://www.mishkatwp.com/themes/coupon-wordpress-theme/' ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro','coupon-flash-deals' ); ?> </a></li>
				</ul>
			</div>
		<?php
	   }
	}
	
	$wp_customize->add_setting('premium_info_buttons', array(
	   'capability'     => 'edit_theme_options',
		'sanitize_callback' => 'coupon_flash_deals_sanitize_text',
	));
		
	$wp_customize->add_control( new Coupon_Flash_Deals_WP_Button_Customize_Control( $wp_customize, 'premium_info_buttons', array(
		'section' => 'upgrade_premium',
    ))
);
}
add_action( 'customize_register', 'coupon_flash_deals_premium_setting' );