<?php
/**
 * Recipe Blogs: Customizer
 *
 * @subpackage Recipe Blogs
 * @since 1.0
 */

function recipe_blogs_customize_register( $wp_customize ) {

	wp_enqueue_style('customizercustom_css', esc_url( get_template_directory_uri() ). '/inc/customizer/customizer.css');

	// Pro Section
 	$wp_customize->add_section('recipe_blogs_pro', array(
        'title'    => __('RECIPE BLOGS PREMIUM', 'recipe-blogs'),
        'priority' => 1,
    ));
    $wp_customize->add_setting('recipe_blogs_pro', array(
        'default'           => null,
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Recipe_Blogs_Pro_Control($wp_customize, 'recipe_blogs_pro', array(
        'label'    => __('RECIPE BLOGS PREMIUM', 'recipe-blogs'),
        'section'  => 'recipe_blogs_pro',
        'settings' => 'recipe_blogs_pro',
        'priority' => 1,
    )));
}
add_action( 'customize_register', 'recipe_blogs_customize_register' );


define('RECIPE_BLOGS_PRO_LINK',__('https://www.ovationthemes.com/products/recipes-wordpress-theme','recipe-blogs'));

define('RECIPE_BLOGS_BUNDLE_BTN',__('https://www.ovationthemes.com/products/wordpress-bundle','recipe-blogs'));

/* Pro control */
if (class_exists('WP_Customize_Control') && !class_exists('Recipe_Blogs_Pro_Control')):
    class Recipe_Blogs_Pro_Control extends WP_Customize_Control{

    public function render_content(){?>
        <label style="overflow: hidden; zoom: 1;">
	        <div class="col-md upsell-btn">
                <a href="<?php echo esc_url( RECIPE_BLOGS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE RECIPE BLOGS PREMIUM','recipe-blogs');?> </a>
	        </div>
            <div class="col-md">
                <img class="recipe_blogs_img_responsive " src="<?php echo esc_url(get_template_directory_uri()); ?>/screenshot.png">
            </div>
	        <div class="col-md">
                <ul style="padding-top:10px">
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Responsive Design', 'recipe-blogs');?> </li>                 
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Demo Importer', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Section Reordering', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Contact Page Template', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Multiple Blog Layouts', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Unlimited Color Options', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Cross Browser Support', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Detailed Documentation Included', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('WPML Compatible (Translation Ready)', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Woo-commerce Compatible', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Full Support', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('10+ Sections', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('SEO Friendly', 'recipe-blogs');?> </li>
                    <li class="upsell-recipe_blogs"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Supper Fast', 'recipe-blogs');?> </li>
                </ul>
        	</div>
            <div class="col-md upsell-btn upsell-btn-bottom">
                <a href="<?php echo esc_url( RECIPE_BLOGS_BUNDLE_BTN ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('WP Theme Bundle (125+ Themes)','recipe-blogs');?> </a>
            </div>
        </label>
    <?php } }
endif;