<?php
$style_outlet_page_builder = esc_html(__( 'Page Builder', 'style-outlet' ));
$style_outlet_page_builder_details = esc_html(__('Theme supports Page Builder. You can drag and drop our widgets with page builder visual editor.', 'style-outlet' ));
$style_outlet_page_layout = esc_html(__( 'Page Layout', 'style-outlet' ));
$style_outlet_page_layout_details = esc_html(__('Theme offers many different page layouts so you can quickly and easily create your pages with no hassle!', 'style-outlet' ));
$style_outlet_unlimited_sidebar = esc_html(__( 'Unlimited Sidebar', 'style-outlet' ));
$style_outlet_unlimited_sidebar_details = esc_html(__( 'Theme includes a different sidebar layouts. Unlimited sidebars allow you to create custom sidebars that match the style and layout of pages!', 'style-outlet' ));
$style_outlet_custom_widget = esc_html(__( 'Custom Widget', 'style-outlet' ));
$style_outlet_custom_widget_details = esc_html(__( 'We offer many custom widgets that are stylized and ready for use. Simply drag & drop into place to activate!', 'style-outlet' ));
$style_outlet_portfolio = esc_html(__( 'Multi Portfolio', 'style-outlet' ));
$style_outlet_portfolio_details = esc_html(__( 'Theme have a unlimited customization options in portfolio. You can use 2, 3, or 4 Columns with masonry layouts!', 'style-outlet' ));
$style_outlet_typography = esc_html(__( 'Typography', 'style-outlet' ));
$style_outlet_typography_details = esc_html(__('Theme loves typography, you can choose from over 500+ Google Fonts and Standard Fonts to customize your site!', 'style-outlet' ));
$style_outlet_slider = esc_html(__( 'Awesome Sliders', 'style-outlet' ));
$style_outlet_slider_details = esc_html(__('Theme includes Flex and Elastic sliders . You can use flexslider as a image,video and google map anywhere in your site.', 'style-outlet' ));
$style_outlet_woocommerce = esc_html(__( 'Woo Commerce', 'style-outlet' ));
$style_outlet_woocommerce_details = esc_html(__('Theme has full design/code integration for WooCommerce, your shop will look as good as the rest of your site!', 'style-outlet' ));
$style_outlet_retina_ready = esc_html(__( 'Retina Ready', 'style-outlet' ));
$style_outlet_retina_ready_details = esc_html(__( 'Theme is Retina Ready. So, Everything looks amazingly sharp and crisp on high resolution retina displays of all sizes!', 'style-outlet' ));
$style_outlet_icons = esc_html(__( 'Icons', 'style-outlet' ));
$style_outlet_icons_details = esc_html(__( ' Choose from over 2500 icons are fully integrated into the theme. Use them anywhere in your site with select your own size and color.', 'style-outlet' ));
$style_outlet_support = esc_html(__( 'Excellent Support', 'style-outlet' ));
$style_outlet_support_details = esc_html(__( 'We truly care about our customers and themes performance. We assure you that you will get the best after sale support like never before!', 'style-outlet' ));
$style_outlet_responsive_layout = esc_html(__( 'Responsive Layout', 'style-outlet' ));
$style_outlet_responsive_layout_details = esc_html( __('Theme is fully responsive and can adapt to any screen size. Resize your browser window to view it!', 'style-outlet' ));
$style_outlet_testimonials = esc_html( __( 'Testimonials', 'style-outlet' ));
$style_outlet_testimonials_details = esc_html( __( 'Display your clients\' glowing comments about your business on your homepage. Showing a specific number of testimonials with use of testimonial widget. ', 'style-outlet' ));
$style_outlet_social_media = esc_html( __( 'Social Media', 'style-outlet' ));
$style_outlet_social_media_details = esc_html( __( 'Want your users to stay in touch? No problem, Theme has Social Media icons all throughout the theme!', 'style-outlet' ));
$style_outlet_google_map = esc_html( __( 'Google Map', 'style-outlet' ));
$style_outlet_google_map_details = esc_html( __('Theme includes Goole Map widget. Find a place on the map and get directions. Or get info like business hours and menus, and see Street View imagery.', 'style-outlet' ));
$style_outlet_customization = esc_html( __( 'Customization', 'style-outlet' ));
$style_outlet_customization_details = esc_html( __('With advanced theme options, page options & extensive docs, its never been easier to customize a theme!', 'style-outlet' ));
$style_outlet_demo_content = esc_html( __( 'Demo content', 'style-outlet' ));
$style_outlet_demo_content_details = esc_html( __('Theme includes single click demo content. You can quickly setup the site like our demo and get started easily!', 'style-outlet' ));
$style_outlet_improvement = esc_html( __( 'Improvement', 'style-outlet' ));
$style_outlet_improvement_details = esc_html( __('We love our theme and customers. We are committed to improve and add new features to Theme!', 'style-outlet' ));

$style_outlet_view_demo = esc_html( __( 'View Demo', 'style-outlet'));
$style_outlet_upgrade_to_pro = esc_html( __( 'Upgrade To Pro', 'style-outlet' ));


$style_outlet_why_upgrade = <<< FEATURES

<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-cog"></i></div>
	<h3>$style_outlet_page_builder</h3>
	<p>$style_outlet_page_builder_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-th-large"></i></div>
	<h3>$style_outlet_page_layout</h3>
	<p>$style_outlet_page_layout_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-th"></i></div>
	<h3>$style_outlet_unlimited_sidebar</h3>
	<p>$style_outlet_unlimited_sidebar_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-code-fork"></i></div>
	<h3>$style_outlet_custom_widget</h3>
	<p>$style_outlet_custom_widget_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-list-alt"></i></div>
	<h3>$style_outlet_portfolio</h3>
	<p>$style_outlet_portfolio_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-font"></i></div>
	<h3>$style_outlet_typography</h3>
	<p>$style_outlet_typography_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-slideshare"></i></div>
	<h3>$style_outlet_slider</h3>
	<p>$style_outlet_slider_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-shopping-cart"></i></div>
	<h3>$style_outlet_woocommerce</h3>
	<p>$style_outlet_woocommerce_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$style_outlet_retina_ready</h3>
	<p>$style_outlet_retina_ready_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-dashboard"></i></div>
	<h3>$style_outlet_icons</h3>
	<p>$style_outlet_icons_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$style_outlet_support</h3>
	<p>$style_outlet_support_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-desktop"></i></div>
	<h3>$style_outlet_responsive_layout</h3>
	<p>$style_outlet_responsive_layout_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-rocket"></i></div>
	<h3>$style_outlet_testimonials</h3>
	<p>$style_outlet_testimonials_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-skype"></i></div>
	<h3>$style_outlet_social_media</h3>
	<p>$style_outlet_social_media_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-map-marker"></i></div>
	<h3>$style_outlet_google_map</h3>
	<p>$style_outlet_google_map_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-edit"></i></div>
	<h3>$style_outlet_customization</h3>
	<p>$style_outlet_customization_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-check"></i></div>
	<h3>$style_outlet_demo_content</h3>
	<p>$style_outlet_demo_content_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-signal"></i></div>
	<h3>$style_outlet_improvement</h3>
	<p>$style_outlet_improvement_details</p>
</div>
FEATURES;

function style_outlet_theme_page() {
	$title = esc_html(__('Style Outlet','style-outlet'));
	add_theme_page( 
		__( 'Upgrade To Style Outlet Pro','style-outlet'),
		$title.'<i class="fa fa-plane theme-icon"></i>', 
		'edit_theme_options',
		'style_outlet_upgrade',
		'style_outlet_display_upgrade'
	);
}

add_action('admin_menu','style_outlet_theme_page');



function style_outlet_display_upgrade() {

    $theme_data = wp_get_theme('style-outlet');
    // Check for current viewing tab
    $tab = null;
    if ( isset( $_GET['tab'] ) ) {
        $tab = $_GET['tab'];
    } else {
        $tab = null;
    }

    $current_action_link =  admin_url( 'themes.php?page=style_outlet_upgrade&tab=pro_features' ); 

    $pro_theme_url = 'https://genexthemes.com/download/styleoutletpro/';
    $doc_url  = 'https://www.genexthemes.com/docs/free/style-outlet/';
    $support_url = 'https://genexthemes.com/free-support-request/'; ?>

    <div class="style-outlet-wrapper about-wrap">
        <h1><?php printf(esc_html__('Welcome to %1$s - Version %2$s', 'style-outlet'), $theme_data->Name ,$theme_data->Version ); ?></h1>
        <div class="about-text"><?php esc_html_e( 'Style Outlet is Powerful multipurpose e-commerce/WooCommerce WordPress Theme. Style Outlet  is the perfect free theme for e-commerce shop. Style Outlet is responsive mobile optimized and using skeleton framework. Stylesheet is generated using SASS and so stays DRY. Best suited for Corporate/Business/Blog sites. There is no theme options panel, instead uses Customizer, core feature of WordPress and comes with lots of options to customize. Has 4 Footer Widget Areas. ', 'style-outlet' ); ?></div>
        <a href="https://genexthemes.com/" target="_blank" class="wp-badge welcome-logo"></a>   
        <p class="upgrade-btn"><a class="upgrade" href="<?php echo esc_url($pro_theme_url); ?>" target="_blank"><?php printf( __( 'Buy %1s Pro', 'style-outlet'), $theme_data->Name ); ?></a></p>

	    <h2 class="nav-tab-wrapper">
	        <a href="?page=style_outlet_upgrade" class="nav-tab<?php echo is_null($tab) ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'Style Outlet', 'style-outlet' ) ?></a>
	        <a href="?page=style_outlet_upgrade&tab=pro_features" class="nav-tab<?php echo $tab == 'pro_features' ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'PRO Fearures', 'style-outlet' );  ?></a>
	        <a href="?page=style_outlet_upgrade&tab=free_vs_pro" class="nav-tab<?php echo $tab == 'free_vs_pro' ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'Free VS PRO', 'style-outlet' ); ?></a>
	        <?php do_action( 'style_outlet_admin_more_tabs' ); ?>
	    </h2>    

        <?php if ( is_null( $tab ) ) { ?>
            <div class="theme_info info-tab-content">
                <div class="theme_info_column clearfix">
                    <div class="theme_info_left">
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Customizer', 'style-outlet' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('%s supports the Theme Customizer for all theme settings. Click "Customize" to start customize your site.', 'style-outlet'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo admin_url('customize.php'); ?>" class="button button-primary"><?php esc_html_e('Start Customize', 'style-outlet'); ?></a>
                            </p>
                        </div>
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Documentation', 'style-outlet' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Need any help to setup and configure %s? Please have a look at our documentations instructions.', 'style-outlet'), $theme_data->Name); ?></p>
                            <p>
                                 <a href="<?php echo esc_url($doc_url); ?>" target="_blank" class="button button-secondary"><?php esc_html_e('Documentation', 'style-outlet'); ?></a>
                            </p>
                            <?php do_action( 'style_outlet_dashboard_theme_links' ); ?>
                        </div>  
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Having Trouble, Need Support?', 'style-outlet' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Support for %s WordPress theme is conducted through Webulous free support ticket system.', 'style-outlet'), $theme_data->Name); ?></p>
                            <p>  
                                <a href="<?php echo esc_url($support_url); ?>"  target="_blank" class="button button-secondary"><?php echo sprintf( esc_html('Create a support ticket', 'style-outlet'), $theme_data->Name); ?></a>
                            </p>
                        </div>   
                       
                    </div>

                    <div class="theme_info_right">
                        <img src="<?php echo get_template_directory_uri(); ?>/screenshot.png" alt="Theme Screenshot" />
                    </div>
                </div>
            </div>
        <?php } ?>

        <?php if ( $tab == 'pro_features' ) { ?>
            <div class="pro-features-tab info-tab-content"><?php
			    global $style_outlet_why_upgrade; ?>
				<div class="wrap clearfix">
				    <?php echo $style_outlet_why_upgrade; ?>
				</div>
			</div><?php 
		} ?>
   
       <!-- Free VS PRO tab -->
        <?php if ( $tab == 'free_vs_pro' ) { ?>
            <div class="free-vs-pro-tab info-tab-content">
	            <div id="free_pro">
	                <table class="free-pro-table">
		                <thead>
			                <tr>
			                    <th></th>
			                    <th><?php echo $theme_data->Name; ?> Lite</th>
			                    <th><?php echo $theme_data->Name; ?> PRO</th>
			                </tr>
		                </thead>
		                <tbody>
		                    <tr>
		                        <td><h3><?php _e('Flex Slider', 'style-outlet'); ?></h3></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                        <td><h3><?php _e('Support', 'style-outlet'); ?></h3></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                        <td><h3><?php _e('Responsive Design', 'style-outlet'); ?></h3></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                        <td><h3><?php _e('Custom Logo Option', 'style-outlet'); ?></h3></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                        <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                         <td><h3><?php _e('Social Links', 'style-outlet'); ?></h3></td>
		                         <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                         <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                    	 <td><h3><?php _e('Unlimited color option', 'style-outlet'); ?></h3></td>
		                    	 <td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	 <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                    	 <td><h3><?php _e('Elastic Slider', 'style-outlet'); ?></h3></td>
		                    	 <td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	 <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	 <td><h3><?php _e('Page Builder Support', 'style-outlet');?></h3></td>
		                    	 <td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	 <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	 <td><h3><?php _e('Page Templates', 'style-outlet');?></h3></td>
		                    	 <td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	 <td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                    	<td><h3><?php _e('Google Map', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    <tr>
		                    	<td><h3><?php _e('Demo Content', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	<td><h3><?php _e('Polylang Compatible', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	<td><h3><?php _e('Multiple Portfolio Layouts', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	<td><h3><?php _e('Multiple Blog Layouts', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	<td><h3><?php _e('Page Animation', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                     <tr>
		                    	<td><h3><?php _e('Unlimited Sidebar', 'style-outlet');?></h3></td>
		                    	<td class="only-pro"><span class="dashicons-before dashicons-no-alt"></span></td>
		                    	<td class="only-lite"><span class="dashicons-before dashicons-yes"></span></td>
		                    </tr>
		                    
		                    <tr class="ti-about-page-text-center">
		                        <td></td>
		                    	<td colspan="2"><a href="<?php echo esc_url($pro_theme_url); ?>" target="_blank" class="button button-primary button-hero"><?php printf( __( 'Buy %1s Pro', 'style-outlet'), $theme_data->Name ); ?></a></td>
		                    </tr>
		                </tbody>
	                </table>			    
				</div>
			</div><?php 
		} ?>

    </div><?php
}

	$options = array(
		'capability' => 10,
		'type' => 'theme_mod',
		'panels' => apply_filters( 'style_outlet_customizer_options', array(
			'style-outlet' => array(
				'priority'       => 9,
				'title'          => __('Theme Options', 'style-outlet'),
				'description'    => __('Theme Options', 'style-outlet'),
				'sections' => array(
					'general' => array(
						'title' => __('General', 'style-outlet'),
						'description' => __('General settings that affects overall site', 'style-outlet'),
						'fields' => array(
							'breadcrumb' => array(
								'type' => 'checkbox',
								'label' => __('Enable Breadcrumb', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'breadcrumb_char' => array(
								'type' => 'select',
								'label' => __('Select Breadcrumb Character', 'style-outlet'),
								'choices' => array(
									'1' => ' &raquo; ',
									'2' => ' // ',
									'3' => ' > '
								),
								'sanitize_callback' => 'style_outlet_breadcrumb_char_choices',
								'default' => '1',
							),
							 'numeric_pagination' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Numeric Page Navigation', 'style-outlet'),
                                'description' => __('Check to display numeric page navigation, instead of Previous Posts / Next Posts links.', 'style-outlet'),
                                'default' => 1,  
                                'sanitize_callback' => 'style_outlet_boolean',
                            ),
                            'sidebar_position' => array(
                                'type' => 'radio',
                                'label' => __('Website Layout Options', 'style-outlet'),
                                'description' => __('Select main content and sidebar alignment.', 'style-outlet'),
                                'choices' => array(
                                    'left' => __('Sidebar Left', 'style-outlet'),
                                    'right' => __('Sidebar Right', 'style-outlet'),
                                    'fullwidth' => __('Full Width', 'style-outlet'),
                                    'no-sidebar' => __('No Sidebar', 'style-outlet'),
                                ),
                                'default' => 'right',  
                                'sanitize_callback' => 'sanitize_text_field', 
                            ),
						),
					),
					'header' => array(
						'title' => __('Header', 'style-outlet'),
						'description' => __('Header options', 'style-outlet'),
						'fields' => array(
							'logo_title' => array(
								'type' => 'checkbox',
								'label' => __('Logo as Title', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'tagline' => array(
								'type' => 'checkbox',
								'label' => __('Show site Tagline', 'style-outlet'),
								'default' => 1,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							/*'header_search' => array(
                                'type' => 'checkbox',
                                'label' => __('Show Search box in Navigation', 'style-outlet'),
                                'default' => 1,
                                'sanitize_callback' => 'style_outlet_boolean', 
                            ),*/

						),
					),
					'footer' => array(
						'title' => __('Footer', 'style-outlet'),
						'description' => __('Footer related options', 'style-outlet'),
						'fields' => array(
							'footer_widgets' => array( 
								'type' => 'checkbox',
								'label' => __('Footer Widget Area', 'style-outlet'),
								'default' => 1,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'scroll_to_top' => array(
								'type' => 'checkbox',
								'label' => __('Enable Scroll To Top', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'copyright' => array(
                                'type' => 'textarea',
                                'label' => __('Footer Copyright Text (Validated that it\'s HTML Allowed)', 'style-outlet'),
                                'description' => __('HTML Allowed. <b>This field is even HTML validated! </b>', 'style-outlet'),
                                'sanitize_callback' => 'style_outlet_footer_copyright',
                            ),
						),
					),
					'home' => array(
						'title' => __('Home', 'style-outlet'),
						'description' => __('Home Page options', 'style-outlet'),
						'fields' => array(
							'slider_field' => array(   
								'type' => 'checkbox',
								'label' => __('Enable Home Page Slider Section', 'style-outlet'),
								'default' => 1,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'slider_cat' => array(
								'type' => 'category',
								'label' => __('Slider Posts Category', 'style-outlet'),
								'sanitize_callback' => 'absint',
							),
							'slider_count' => array(
								'type' => 'text',
								'label' => __('No. of Sliders', 'style-outlet'),
								'sanitize_callback' => 'absint',
								'default' => 3,
							),
							'enable_service_section' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Home page Service Section Discount Offer', 'style-outlet'),
                                'default' => 1,
								'sanitize_callback' => 'absint',
                            ),
							'service-1'  => array(
								'type' => 'dropdown-pages',
								'label' =>__('Select the page to display Service Offer','style-outlet'),
								'sanitize_callback' =>'absint',
							),
							'service-2'  => array(
								'type' => 'dropdown-pages',
								'label' =>__('Select the page to display Service Offer','style-outlet'),
								'sanitize_callback' =>'absint',
							),
							'service-3'  => array(
								'type' => 'dropdown-pages',
								'label' =>__('Select the page to display Service Offer','style-outlet'),
								'sanitize_callback' =>'absint',
							),
							/* 'enable_shop_page' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable to show the shop page', 'style-outlet'),
                                'default' => 1,  
                                'sanitize_callback' => 'style_outlet_boolean',
                            ),*/
						),
					),
					'blog' => array(
						'title' => __('Blog', 'style-outlet'),
						'description' => __('Blog Related Posts options', 'style-outlet'),
						'fields' => array(
							'featured_image' => array(  
								'type' => 'checkbox',
								'label' => __('Enable Featured Image', 'style-outlet'),
								'default' => 1,
								'sanitize_callback' => 'style_outlet_boolean',
							),
                           'featured_image_size' => array(
                                'type' => 'radio',
                                'label' => __('Choose the featured image display type for Blog Page ', 'style-outlet'),
                                'choices' => array(
                                    '1' => __('Large Featured Image', 'style-outlet'),
                                    '2' => __('Small Featured Image', 'style-outlet'),        
                                ),
                                'default' => '1', 
                                'sanitize_callback' => 'absint',
                            ),
						),
					),
					'single_blog' => array(
						'title' => __('Single Blog', 'style-outlet'),
						'description' => __('Single Blog page Related Posts options', 'style-outlet'),
						'fields' => array(
							'single_featured_image' => array(
								'type' => 'checkbox',
								'label' => __('Enable Single Post Featured Image', 'style-outlet'),
								'default' => 1,
								'sanitize_callback' => 'style_outlet_boolean',
							),
							'single_featured_image_size' => array(
								'type' => 'radio',
								'label' => __('Choose the featured image display type for Single Page ', 'style-outlet'),
								'choices' => array(
									'1' => __('Large Featured Image', 'style-outlet'),
									'2' => __('Small Featured Image', 'style-outlet'),       
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',  
							),
							'social_sharing_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Social Sharing Box below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'facebook_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Facebook Sharing option below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'twitter_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Twitter Sharing option below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'linkedin_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Linkedin Sharing option below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'google-plus_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Google Plus Sharing option below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'email_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Email Sharing option below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'author_bio_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Author Bio Box below single post', 'style-outlet'),
								'default' => 0,
								'sanitize_callback' => 'style_outlet_boolean',    
							),
							'related_posts' => array(
								'type' => 'checkbox',
								'label' => __('Show Related posts', 'style-outlet'),
								'default' => 0, 
								'sanitize_callback' => 'style_outlet_boolean', 
							),
							'related_posts_hierarchy' => array(
								'type' => 'radio',
								'label' => __('Related Posts Must Be Shown As:', 'style-outlet'),
								'choices' => array(
									'1' => __('Related Posts By Tags', 'style-outlet'),
									'2' => __('Related Posts By Categories', 'style-outlet'),      
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',    
							),
						),
					),
				)
			),
		) 
	)
	);

function style_outlet_boolean($value) {
	if(is_bool($value)) {
		return $value;
	} else {
		return false;
	}
}

function style_outlet_breadcrumb_char_choices($value='') {
	$choices = array('1','2','3');

	if( in_array($value, $choices)) {
		return $value;
	} else {
		return '1';
	}
}

if ( ! function_exists( 'style_outlet_footer_copyright' ) ) {

    function style_outlet_footer_copyright($string) {
        $allowed_tags = array(    
			'a' => array(
				'href' => array(),
				'title' => array(),
				'target' => array(), 
			),
			'img' => array(
				'src' => array(),  
				'alt' => array(),
			),
			'p' => array(),
			'br' => array(),
			'em' => array(),
			'strong' => array(),
        );
        return wp_kses( $string,$allowed_tags);

    }
}

