<?php 
$oner_page_builder = __( 'Page Builder', 'oner' );
$oner_page_builder_details = __( 'oner Pro supports Page Builder. All our shortcodes can be used as widgets too. You can drag and drop our widgets with page builder visual editor.', 'oner' );
$oner_page_layout = __( 'Page Layout', 'oner' );
$oner_page_layout_details = __( 'oner Pro offers many different page layouts so you can quickly and easily create your pages with various layout without any hassle!', 'oner' );
$oner_unlimited_sidebar = __( 'Unlimited Sidebar', 'oner' );
$oner_unlimited_sidebar_details = __( 'Unlimited sidebars allows you to create multiple sidebars. Check out our demo site to see how different pages displays different sidebars!', 'oner' );
$oner_shortcode_builder = __( 'Shortcode Builder', 'oner' );
$oner_shortcode_builder_details = __( 'With our shortcode builder and lots of shortcodes, you can easily create nested shortcodes and build custom pages!', 'oner' );
$oner_portfolio = __( 'Multi Portfolio', 'oner' );
$oner_portfolio_details = __( '7 portfolio layouts with Isotope filtering, 3 blog layouts and multiple other alternate layouts for interior pages!', 'oner' );
$oner_typography = __( 'Typography', 'oner' );
$oner_typography_details = __( 'oner Pro loves typography, you can choose from over 500+ Google Fonts and Standard Fonts to customize your site!', 'oner' );
$oner_slider = __( 'Awesome Sliders', 'oner' );
$oner_slider_details = __( 'oner Pro includes two types of slider. You can use both Flex and Elastic sliders anywhere in your site.', 'oner' );
$oner_woocommerce = __( 'Woo Commerce', 'oner' );
$oner_woocommerce_details = __( 'oner Pro has full design/code integration for WooCommerce, your shop will look as good as the rest of your site!', 'oner' );
$oner_custom_widget = __( 'Custom Widget', 'oner' );
$oner_custom_widget_details = __( 'We offer many custom widgets that are stylized and ready for use. Simply drag &amp; drop into place to activate!', 'oner' );
$oner_advanced_admin = __( 'Advanced Admin', 'oner' );
$oner_advanced_admin_details = __( ' you can customize any part of your site quickly and easily using customize options!', 'oner' );
$oner_font_awesome = __( 'Font Awesome', 'oner' );
$oner_font_awesome_details = __( 'Font Awesome icons are fully integrated into the theme. Use them anywhere in your site in 6 different sizes!', 'oner' );
$oner_responsive_layout = __( 'Responsive Layout', 'oner' );
$oner_responsive_layout_details = __( 'oner Pro is fully responsive and can adapt to any screen size. Resize your browser window to view it!', 'oner' );
$oner_testimonials = __( 'Testimonials', 'oner' );
$oner_testimonials_details = __( 'With our testimonial post type, shortcode and widget, Displaying testimonials is a breeze.', 'oner' );
$oner_social_media = __( 'Social Media', 'oner' );
$oner_social_media_details = __( 'Want your users to stay in touch? No problem, oner Pro has Social Media icons all throughout the theme!', 'oner' );
$oner_google_map = __( 'Google Map', 'oner' );
$oner_google_map_details = __( 'oner Pro includes Goole Map as shortcode and widget. So, you can use it anywhere in your site!', 'oner' );
$oner_view_demo = __( 'View Demo', 'oner');
$oner_upgrade_to_pro = __( 'Upgrade To Pro', 'oner' );


$oner_why_upgrade = <<< FEATURES


<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-cog"></i></div>
	<h3>$oner_page_builder</h3>
	<p>$oner_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>$oner_page_layout</h3>
	<p>$oner_page_layout_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-th"></i></div>
	<h3>$oner_unlimited_sidebar</h3>
	<p>$oner_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>$oner_shortcode_builder</h3>
	<p>$oner_shortcode_builder_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-camera"></i></div>
	<h3>$oner_portfolio</h3>
	<p>$oner_portfolio_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-font"></i></div>
	<h3>$oner_typography</h3>
	<p>$oner_typography_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-slideshare"></i></div>
	<h3>$oner_slider</h3>
	<p>$oner_slider_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-leaf"></i></div>
	<h3>$oner_woocommerce</h3>
	<p>$oner_woocommerce_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-tasks"></i></div>
	<h3>$oner_custom_widget</h3>
	<p>$oner_custom_widget_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-dashboard"></i></div>
	<h3>$oner_advanced_admin</h3>
	<p>$oner_advanced_admin_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$oner_font_awesome</h3>
	<p>$oner_font_awesome_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-arrows"></i></div>
	<h3>$oner_responsive_layout</h3>
	<p>$oner_responsive_layout_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$oner_testimonials</h3>
	<p>$oner_testimonials_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-twitter"></i></div>
	<h3>$oner_social_media</h3>
	<p>$oner_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>$oner_google_map</h3>
	<p>$oner_google_map_details</p>
</div>
FEATURES;

function oner_theme_page() {
	$title = esc_html(__('Oner Theme','oner'));
	add_theme_page( 
		__( 'Upgrade To Oner Pro','oner'),
		$title.'<i class="fa fa-plane theme-icon"></i>', 
		'edit_theme_options',
		'oner_upgrade',
		'oner_display_upgrade'
	);
}

add_action('admin_menu','oner_theme_page');


function oner_display_upgrade() {

    $theme_data = wp_get_theme('oner');
    // 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=oner_upgrade&tab=pro_features' ); ?>

    <div class="oner-wrapper about-wrap">
        <h1><?php printf(esc_html__('Welcome to Oner - Version %1s', 'oner'), $theme_data->Version ); ?></h1>
        <div class="about-text"><?php esc_html_e( 'Oner is an outstanding creative one-page theme for WordPress that can be used for any business to create beautiful, clean and professional websites with fully responsive capabilities. The design allows you to include various sections like testimonials, portfolio, services, team, etc to beautifully showcase your business through your website.', 'oner' ); ?></div>
        <a href="https://www.webulousthemes.com/" target="_blank" class="wp-badge welcome-logo"></a>   
        <p class="upgrade-btn"><a class="upgrade" href="https://www.webulousthemes.com/theme/oner-pro/" target="_blank"><i class="fa fa-upload"></i><?php esc_html_e( 'Upgrade to Pro -$39', 'oner' ); ?></a></p>

	   <h2 class="nav-tab-wrapper">
	        <a href="?page=oner_upgrade" class="nav-tab<?php echo is_null($tab) ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'Oner', 'oner' ) ?></a>
	        <a href="?page=oner_upgrade&tab=pro_features" class="nav-tab<?php echo $tab == 'pro_features' ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'PRO Fearures', 'oner' );  ?></a>
	        <a href="?page=oner_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', 'oner' ); ?></a>
	        <?php do_action( 'oner_admin_more_tabs' ); ?>
	    </h2>  


        <?php if ( is_null( $tab ) ) { ?>
            <div class="theme_info info-tab-content">
                <div class="theme_info_column clearfix">
					<div id="webulous-create-web">
	                	<a href="https://www.webulousthemes.com/checkout?edd_action=add_to_cart&download_id=23052" target="_blank">
							<div id="webulous-mode-wrap">
								<?php echo sprintf ('<h3>%1$s</h3><p>%2$s</p>',__('New to Creating a Website?','oner'),__('We will build you a complete website based on the theme you selected. We will populate content, change colors and do any look and feel customisation work you prefer.','oner') ); ?>
							</div>
							<div class="image-wrap">
								<?php echo sprintf ( '<img src="'. esc_url( get_template_directory_uri() ).'/images/api.png" alt="%1$s" />',__('Image','oner') ); ?>
							</div>
						</a>
					</div>
                    <div class="theme_info_left">
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Customizer', 'oner' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('%s supports the Theme Customizer for all theme settings. Click "Customize" to start customize your site.', 'oner'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo admin_url('customize.php'); ?>" class="button button-primary"><?php esc_html_e('Start Customize', 'oner'); ?></a>
                            </p>
                        </div>
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Documentation', 'oner' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Need any help to setup and configure %s? Please have a look at our documentations instructions.', 'oner'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo esc_url( 'https://www.webulousthemes.com/oner-free/' ); ?>" target="_blank" class="button button-secondary"><?php esc_html_e('Oner Documentation', 'oner'); ?></a>
                            </p>
                            <?php do_action( 'oner_dashboard_theme_links' ); ?>
                        </div>
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Having Trouble, Need Support?', 'oner' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Support for %s WordPress theme is conducted through Webulous free support ticket system.', 'oner'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo esc_url('https://www.webulousthemes.com/free-support-request/' ); ?>" target="_blank" class="button button-secondary"><?php echo sprintf( esc_html('Create a support ticket', 'oner'), $theme_data->Name); ?></a>
                            </p>
                        </div>
                    </div>

                    <div class="theme_info_right">
                        <img src="<?php echo esc_url( 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 $oner_why_upgrade; ?>
				<div class="wrap clearfix">
				    <?php echo $oner_why_upgrade; ?>
				</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', 'oner'); ?></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', 'oner'); ?></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', 'oner'); ?></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', 'oner'); ?></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', 'oner'); ?></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', 'oner'); ?></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', 'oner'); ?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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', 'oner');?></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="https://www.webulousthemes.com/theme/oner-pro/" target="_blank" class="button button-primary button-hero"><?php printf( __( 'Buy %1s Pro', 'oner'), $theme_data->Name ); ?></a></td>
		                    </tr>
		                </tbody>
	                </table>			    
				</div>
			</div><?php 
		} ?>
    </div><?php
}
    

	$options = array(
		'capability' => 10,
		'type' => 'theme_mod',
		'panels' => apply_filters( 'oner_customizer_options', array(
			'oner' => array(
				'priority'       => 9,
				'title'          => __('General Options', 'oner'),
				'description'    => __('General Theme Options', 'oner'),
				'sections' => array(
					'general' => array(
						'title' => __('General', 'oner'),
						'description' => __('General settings that affects overall site', 'oner'),
						'fields' => array(
							'breadcrumb' => array( 
								'type' => 'checkbox',
								'label' => __('Enable Breadcrumb', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'breadcrumb_char' => array(
								'type' => 'select',
								'label' => __('Select Breadcrumb Character', 'oner'),
								'choices' => array(
									'1' => ' &raquo; ',
									'2' => ' // ',
									'3' => ' > '
								),
								'sanitize_callback' => 'oner_breadcrumb_char_choices',
								'default' => '1',
							),
							 'numeric_pagination' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Numeric Page Navigation', 'oner'),
                                'description' => __('Check to display numeric page navigation, instead of Previous Posts / Next Posts links.', 'oner'),
                                'default' => 1,  
                            ),
                            'sidebar_position' => array(
                                'type' => 'radio',
                                'label' => __('Website Layout Options', 'oner'),
                                'description' => __('Select main content and sidebar alignment.', 'oner'),
                                'choices' => array(
                                    'left' => __('Sidebar Left', 'oner'),
                                    'right' => __('Sidebar Right', 'oner'),
                                    'fullwidth' => __('Full Width', 'oner'),
                                    'no-sidebar' => __('No Sidebar', 'oner'),
                                ),
                                'default' => 'right',  
                            ),
                            'scroll_to_top' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Scroll to Top button', 'oner'),
                                'default' => 1, 
                                'sanitize_callback' => 'oner_boolean', 
                            ),

						),
					),
					'footer' => array(
						'title' => __('Footer', 'oner'),
						'description' => __('Footer related options', 'oner'),
						'fields' => array(
							'footer_widgets' => array(
								'type' => 'checkbox',
								'label' => __('Footer Widget Area', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'copyright' => array(
                                'type' => 'textarea',
                                'label' => __('Footer Copyright Text (Validated that it\'s HTML Allowed)', 'oner'),
                                'description' => __('HTML Allowed. <b>This field is even HTML validated! </b>', 'oner'),
                                'sanitize_callback' => 'oner_footer_copyright',
                            ),
						),
					),	
					'blog' => array(
						'title' => __('Blog', 'oner'),
						'description' => __('Blog Related Posts options', 'oner'),
						'fields' => array(
							'featured_image' => array(  
								'type' => 'checkbox',
								'label' => __('Enable Featured Image', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
                           'featured_image_size' => array(
                                'type' => 'radio',
                                'label' => __('Choose the featured image display type for Blog Page ', 'oner'),
                                'choices' => array(
                                    '1' => 'Large Featured Image',
                                    '2' => 'Small Featured Image',        
                                ),
                                'default' => '1',      
                            ),
						),
					),
					'single_blog' => array(
						'title' => __('Single Blog', 'oner'),
						'description' => __('Single Blog page Related Posts options', 'oner'),
						'fields' => array(
							'single_featured_image' => array(
								'type' => 'checkbox',
								'label' => __('Enable Single Post Featured Image', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'single_featured_image_size' => array(
								'type' => 'radio',
								'label' => __('Choose the featured image display type for Single Page ', 'oner'),
								'choices' => array(
									'1' => __('Large Featured Image', 'oner'),
									'2' => __('Small Featured Image', 'oner'),       
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',  
							),
							'social_sharing_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Social Sharing Box below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'facebook_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Facebook Sharing option below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'twitter_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Twitter Sharing option below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'linkedin_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Linkedin Sharing option below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'google-plus_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Google Plus Sharing option below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'email_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Email Sharing option below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'author_bio_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Author Bio Box below single post', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',    
							),
							'related_posts' => array(
								'type' => 'checkbox',
								'label' => __('Show Related posts', 'oner'),
								'default' => 0, 
								'sanitize_callback' => 'oner_boolean', 
							),
							'related_posts_hierarchy' => array(
								'type' => 'radio',
								'label' => __('Related Posts Must Be Shown As:', 'oner'),
								'choices' => array(
									'1' => __('Related Posts By Tags', 'oner'),
									'2' => __('Related Posts By Categories', 'oner'),      
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',    
							),
						),
					),
				)
			),
	        'home-oner' => array(
				'priority'       => 9,
				'title'          => __(' Home Options', 'oner'),
				'description'    => __(' Select Front page display as a static front page in order to visible the following sections', 'oner'),
				'sections' => array(
					'menu-section' => array(
						'title' => __('Section: Menu Settings', 'oner'),
						'description' => __(' Menu Related Settings', 'oner'),
						'fields' => array(
							'menu_section_home_link' => array(   
								'type' => 'checkbox',
								'label' => __('Disable Home Link', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'menu_section_section_menu' => array(
								'type' => 'checkbox',
								'label' => __('Disable Section Menu', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'menu_section_home_link_label' => array(
								'type' => 'text', 
								'label' => __('Home Link Label', 'oner'),
								'default' => __('Home','oner')
							),
							'menu_section_sticky_header' => array(   
								'type' => 'checkbox',
								'label' => __('Enable Sticky Header', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',
							),	
						),  
				    ),
					'slider-section' => array(
						'title' => __('Section: Slider', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, slider related options', 'oner'),
						'fields' => array(
							'slider_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1, 
								'sanitize_callback' => 'oner_boolean',
							),
							'slider_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('slider','oner'),
							),
							'slider_section_cat' => array( 
								'type' => 'category',
								'label' => __('Slider Posts Category', 'oner'),
								'sanitize_callback' => 'absint',
								'default' => 1,
							),
							/*'slider_section_flexcaption_bg' => array(   
								'type' => 'checkbox',
								'label' => __('Enable Flexcaption Background', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),*/
							'slider_section_slider_count' => array(
								'type' => 'text',
								'label' => __('No. of Sliders', 'oner'),
								'default' => 2,
								'sanitize_callback' => 'absint',
							),
							
						),
				    ),
				    'blog-section' => array(
						'title' => __('Section: Blog', 'oner'),
						'description' => __('Select Front page display as a static front page in orde to visible this section, Blog related options', 'oner'),
						'fields' => array(
							'blog_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'blog_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('blog','oner'),
							),
							'blog_section_title' => array(
								'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'blog_section_recent_posts_count' => array(
								'type' => 'text',
								'label' => __('No. of Recent Posts', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'recent_posts_exclude' => array(
								'type' => 'text',
								'label' => __('Exclude the Posts from Home Page', 'oner'),
								'description' => __('Post IDs, separated by commas.','oner'),
								'sanitize_callback' => 'sanitize_text_field', 
							), 
							
						),
				    ),
				    'gallery-section' => array(
						'title' => __('Section: Gallery', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, Gallery related options', 'oner'),
						'fields' => array(
							'gallery_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'gallery_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('gallery','oner'),
							),
							'gallery_section_title' => array(
								'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'gallery_section_cat' => array(
								'type' => 'category',
								'label' => __('Posts Category', 'oner'),
							),
							'gallery_section_count' => array(
								'type' => 'text',
								'label' => __('No. of Post', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'gallery_section_grid_col' => array(
								'type' => 'text',
								'label' => __('Layout Columns (Choose either 1,2,3,4)', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'gallery_section_item_space' => array(
								'type' => 'text',
								'label' => __('Item Spacing', 'oner'),
								'sanitize_callback' => 'absint',
							),
							
						),
				    ),
				    'service-section' => array(
						'title' => __('Section: Service', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, Service related options', 'oner'),
						'fields' => array(
							'service_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'service_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('service','oner'),
							),
							'service_section_title' => array(
								'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'service_section_icon_1' => array(
								'type' => 'icons-picker',
								'label' => __('Choose Service Section Icons #1', 'oner'),
							),
							'service_section_1' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #1', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'service_section_icon_2' => array(
								'type' => 'icons-picker',
								'label' => __('Choose Service Section Icons #2', 'oner'),
							),
							'service_section_2' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #2', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'service_section_icon_3' => array(
								'type' => 'icons-picker',
								'label' => __('Choose Service Section Icons #3', 'oner'),
							),
							'service_section_3' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #3', 'oner'),
								'sanitize_callback' => 'absint',
							),
								
						),
				    ),
				    'team-section' => array(
						'title' => __('Section: Team', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, Team related options', 'oner'),
						'fields' => array(
							'team_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'team_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('team','oner'),
							),
							'team_section_title' => array(
							    'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'team_section_cat' => array(
								'type' => 'category',
								'label' => __('Posts Category', 'oner'),
							),
							'team_section_count' => array(
								'type' => 'text',
								'label' => __('No. of Post', 'oner'),
								'sanitize_callback' => 'absint',
							),
						),
				    ),
				    'testimonial-section' => array(
						'title' => __('Section: Testimonial', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, Testimonial related options', 'oner'),
						'fields' => array(
							'testimonial_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'testimonial_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('testimonial','oner'), 
							),
							'testimonial_section_title' => array(
								'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'testimonial_section_cat' => array(
								'type' => 'category',
								'label' => __('Posts Category', 'oner'),
							),
							'testimonial_section_count' => array(
								'type' => 'text',
								'label' => __('No. of Post', 'oner'),
								'sanitize_callback' => 'absint',
							),
						),
				    ),
				    'client-section' => array(
						'title' => __('Section: Client', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, Client related options', 'oner'),
						'fields' => array(
							'client_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'client_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('client','oner'),
							),
							'client_section_title' => array(
								'type' => 'posts',
								'label' => __('Section Title & Description', 'oner'),
							),
							'client_section_cat' => array(
								'type' => 'category',
								'label' => __('Posts Category', 'oner'),
							),
							'client_section_count' => array(
								'type' => 'text',
								'label' => __('No. of Post', 'oner'),
								'sanitize_callback' => 'absint',
							),
							'client_section_item_space' => array(
								'type' => 'text',
								'label' => __('Item Spacing', 'oner'),
								'sanitize_callback' => 'absint',
							),	
						),
				    ),
				    'cta-section' => array(
						'title' => __('Section: CTA', 'oner'),
						'description' => __(' Select Front page display as a static front page in orde to visible this section, CTA related options', 'oner'),
						'fields' => array(
							'cta_section_status' => array(   
								'type' => 'checkbox',
								'label' => __('Check this box to Show this section', 'oner'),
								'default' => 1,
								'sanitize_callback' => 'oner_boolean',
							),
							'cta_section_id' => array(
								'type' => 'text',
								'label' => __('Section ID: The section id, we will use this for link anchor.', 'oner'),
							    'default' => __('service','oner'),
							),							
							'cta_section_content' => array(
								'type' => 'dropdown-pages',
								'label' => __('Select Page', 'oner'),
								'sanitize_callback' => 'absint',
							),
						),
				    ),
				    'page-content-section' => array(
						'title' => __('Page Content', 'oner'),
						'description' => __('Default Page content related option', 'oner'),
						'fields' => array(
							'page_content_status' => array(   
								'type' => 'checkbox',  
								'label' => __('Check this box to Show page content', 'oner'),
								'default' => 0,
								'sanitize_callback' => 'oner_boolean',
							),
						),
				    ),
				    'exclude-cat-section' => array(
						'title' => __('Exclude Category Settings ', 'oner'),
						'description' => __('Exclude Categories Check multiple categories to exclude from blog and archive page.', 'oner'),
						'fields' => array(							
							'exclude_cat_section' => array(
								'type' => 'multi-checkbox', 
								'label' => __('Exclude Categories', 'oner'),
							),
						),
				    ),
			    )
	        )
	    )       
	    )
    );

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

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

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

if ( ! function_exists( 'oner_footer_copyright' ) ) {

    function oner_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);

    }
}

