<?php
/**
*Promotion customizer options
*
* @package gridchamp
*
*/

if (! function_exists('walkermag_themeinfo_options_register')) {
	function walkermag_themeinfo_options_register( $wp_customize ) {
		if(!walkermag_set_to_premium()){
			require get_template_directory() . '/inc/upgrade-control.php';
			$wp_customize->register_section_type( 'WalkerMag_Customize_Section_Ugrade' );
			$wp_customize->add_section('walkermag_info_section', 
			 	array(
			        'title' => esc_html__('UPGRADE TO PRO', 'walkermag'),
			        'priority' => 1,
		
		    	)
			 );

			
            $wp_customize->add_setting( 'walkermag_info_message_text', 
                array(
                   'sanitize_callback' => 'sanitize_text_field',
                ) 
            );

        $wp_customize->add_control( new Walkermag_Custom_Text_Control( $wp_customize, 'walkermag_info_message_text', 
            array(
                'label' => esc_html__( 'Upgrade to premium version to get more premium features', 'walkermag' ),
                'section' => 'walkermag_info_section',
                'settings' => 'walkermag_info_message_text',
                'description' => '',
                'type' => 'walkermag-custom-text',
                
            ) )
        );
        $walkermag_info = '';
	    $walkermag_info.='<ul classs="features-list"><li class="walkermag-info-row list"><label class="row-element">'.esc_html__('Additional Header Layout','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('Additional Slider Layout','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('8+ Section Layout','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('3 More Additional Home Section','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('Post Meta Control','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('Advertisement image enable for each section and posts','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('Related Post Enable/disable option','walkermag').'</li>';
	    $walkermag_info.='<li class="walkermag-info-row list"><label class="row-element">'.esc_html__('5 Custom Widgets','walkermag').'</li></ul>';
	    

	    $walkermag_info .= '<span class="walkermag-info-row"><label class="row-element"> </label><a class="button walkermag-pro-button more-info" href="' . esc_url( 'https://walkerwp.com/walkermag/' ) . '" target="_blank">' . esc_html__( 'MORE INFO', 'walkermag' ) . '</a><a class="button walkermag-pro-button" href="' . esc_url( 'https://walkerwp.com/pricing-plans/' ) . '" target="_blank">' . esc_html__( 'UPGRADE TO PRO', 'walkermag' ) . '</a></span>';
	    



        $wp_customize->add_setting( 'walkermag_upsell_info', array(
            'default'           => '',
            'sanitize_callback' => 'wp_kses_post',
        ) );

        $wp_customize->add_control( new Walkermag_Custom_Text_Control( $wp_customize, 'walkermag_upsell_info', array(
	        'section' => 'walkermag_info_section',
	        'label'   => $walkermag_info,
	        'type' => 'walkermag-custom-text',
	    ) ) );


	    $front_page_upsell_description= '';
	    
        $front_page_upsell_description .= '<ul class="upsell-features"> <li>'.esc_html('3 More Additional Home Section','walkermag').'</li><li>'.esc_html('Advertisement Image section for each sections','walkermag').'</li><li>'.esc_html('8+ Additonl Section Layouts','walkermag').'</li><li>'.esc_html('2 More Additional Slider Layout','walkermag').'</li></ul>';
        $front_page_upsell_description .= '<span class="walkermag-info-row"><label class="row-element"> </label><a class="button walkermag-pro-button more-info" href="' . esc_url( 'https://walkerwp.com/walkermag/' ) . '" target="_blank">' . esc_html__( 'MORE INFO', 'walkermag' ) . '</a><a class="button walkermag-pro-button" href="' . esc_url( 'https://walkerwp.com/pricing-plans/' ) . '" target="_blank">' . esc_html__( 'UPGRADE TO PRO', 'walkermag' ) . '</a></span>';

        $wp_customize->add_section(
            new WalkerMag_Customize_Section_Ugrade(
                $wp_customize,
                'walkermag_upsell_features_notices',
                array(
                    'title'    => esc_html__('Upgrade to premium version to get more features','walkermag'),
                    'description' => $front_page_upsell_description,
                    'priority'  => 40,
                    'panel' => 'walkermag_frontpage_option',

                )
            )
        );




	}
  }
}
add_action( 'customize_register', 'walkermag_themeinfo_options_register' );