<?php
function cargo_ships_premium_setting( $wp_customize ) {
	
	/*=========================================
	Page Layout Settings Section
	=========================================*/
	$wp_customize->add_section(
        'cargo_ships_upgrade_premium',
        array(
            'title' 		=> __('Upgrade to Pro','cargo-ships'),
			'priority'      => 1,
		)
    );
	
	/*=========================================
	Add Buttons
	=========================================*/
	
	class Cargo_Ships_WP_Button_Customize_Control extends WP_Customize_Control {
	public $type = 'cargo_ships_upgrade_premium';

	   function render_content() {
		?>
			<div class="premium_info">
				<ul>
					<li><a class="upgrade-to-pro" href="<?php echo esc_url( CARGO_SHIPS_BUY_NOW ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro','cargo-ships' ); ?> </a></li>
				</ul>
			</div>
			<div class="premium_info">
				<ul>
					<li><a class="upgrade-to-pro" href="<?php echo esc_url( CARGO_SHIPS_DEMO_PRO ); ?>" target="_blank"><?php esc_html_e( 'Live Demo','cargo-ships' ); ?> </a></li>
				</ul>
			</div>
			<div class="premium_info">
				<ul>
					<li><a class="upgrade-to-pro" href="<?php echo esc_url( CARGO_SHIPS_DOCS_FREE ); ?>" target="_blank"><?php esc_html_e( 'Free Documentation','cargo-ships' ); ?> </a></li>
				</ul>
			</div>
			<div class="premium_info discount-box">
				<ul>
					<li class="discount-text"><?php esc_html_e( 'Special Discount of 35% Use Code “winter35”','cargo-ships' ); ?></li>
					<li><a class="upgrade-to-pro" href="<?php echo esc_url( CARGO_SHIPS_BUNDLE ); ?>" target="_blank"><?php esc_html_e( 'Wordpress Theme Bundle','cargo-ships' ); ?> </a></li>
				</ul>
			</div>
		<?php
	   }
	}
	
	$wp_customize->add_setting('cargo_ships_premium_info_buttons', array(
	   'capability'     => 'edit_theme_options',
		'sanitize_callback' => 'cargo_ships_sanitize_text',
	));
		
	$wp_customize->add_control( new Cargo_Ships_WP_Button_Customize_Control( $wp_customize, 'cargo_ships_premium_info_buttons', array(
		'section' => 'cargo_ships_upgrade_premium',
    ))
);
}
add_action( 'customize_register', 'cargo_ships_premium_setting' );