<?php      
$nuptial_page_builder = esc_html(__( 'Page Builder', 'nuptial' ));
$nuptial_page_builder_details = esc_html(__('Theme supports Page Builder. You can drag and drop our widgets with page builder visual editor.', 'nuptial' ));
$nuptial_page_layout = esc_html(__( 'Page Layout', 'nuptial' ));
$nuptial_page_layout_details = esc_html(__('Theme offers many different page layouts so you can quickly and easily create your pages with no hassle!', 'nuptial' ));
$nuptial_unlimited_sidebar = esc_html(__( 'Unlimited Sidebar', 'nuptial' ));
$nuptial_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!', 'nuptial' ));
$nuptial_custom_widget = esc_html(__( 'Custom Widget', 'nuptial' ));
$nuptial_custom_widget_details = esc_html(__( 'We offer many custom widgets that are stylized and ready for use. Simply drag & drop into place to activate!', 'nuptial' ));
$nuptial_portfolio = esc_html(__( 'Multi Portfolio', 'nuptial' ));
$nuptial_portfolio_details = esc_html(__( 'Theme have a unlimited customization options in portfolio. You can use 2, 3, or 4 Columns with masonry layouts!', 'nuptial' ));
$nuptial_typography = esc_html(__( 'Typography', 'nuptial' ));
$nuptial_typography_details = esc_html(__('Theme loves typography, you can choose from over 500+ Google Fonts and Standard Fonts to customize your site!', 'nuptial' ));
$nuptial_slider = esc_html(__( 'Awesome Sliders', 'nuptial' ));
$nuptial_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.', 'nuptial' ));
$nuptial_woocommerce = esc_html(__( 'Woo Commerce', 'nuptial' ));
$nuptial_woocommerce_details = esc_html(__('Theme has full design/code integration for WooCommerce, your shop will look as good as the rest of your site!', 'nuptial' ));
$nuptial_retina_ready = esc_html(__( 'Retina Ready', 'nuptial' ));
$nuptial_retina_ready_details = esc_html(__( 'Theme is Retina Ready. So, Everything looks amazingly sharp and crisp on high resolution retina displays of all sizes!', 'nuptial' ));
$nuptial_icons = esc_html(__( 'Icons', 'nuptial' ));
$nuptial_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.', 'nuptial' ));
$nuptial_support = esc_html(__( 'Excellent Support', 'nuptial' ));
$nuptial_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!', 'nuptial' ));
$nuptial_responsive_layout = esc_html(__( 'Responsive Layout', 'nuptial' ));
$nuptial_responsive_layout_details = esc_html( __('Theme is fully responsive and can adapt to any screen size. Resize your browser window to view it!', 'nuptial' ));
$nuptial_testimonials = esc_html( __( 'Testimonials', 'nuptial' ));
$nuptial_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. ', 'nuptial' ));
$nuptial_social_media = esc_html( __( 'Social Media', 'nuptial' ));
$nuptial_social_media_details = esc_html( __( 'Want your users to stay in touch? No problem, Theme has Social Media icons all throughout the theme!', 'nuptial' ));
$nuptial_google_map = esc_html( __( 'Google Map', 'nuptial' ));
$nuptial_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.', 'nuptial' ));
$nuptial_customization = esc_html( __( 'Customization', 'nuptial' ));
$nuptial_customization_details = esc_html( __('With advanced theme options, page options & extensive docs, its never been easier to customize a theme!', 'nuptial' ));
$nuptial_demo_content = esc_html( __( 'Demo content', 'nuptial' ));
$nuptial_demo_content_details = esc_html( __('Theme includes single click demo content. You can quickly setup the site like our demo and get started easily!', 'nuptial' ));
$nuptial_improvement = esc_html( __( 'Improvement', 'nuptial' ));
$nuptial_improvement_details = esc_html( __('We love our theme and customers. We are committed to improve and add new features to Theme!', 'nuptial' ));

$nuptial_view_demo = esc_html( __( 'View Demo', 'nuptial'));
$nuptial_upgrade_to_pro = esc_html( __( 'Upgrade To Pro', 'nuptial' ));


$nuptial_why_upgrade = <<< FEATURES

<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-cog"></i></div>
	<h3>$nuptial_page_builder</h3>
	<p>$nuptial_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>$nuptial_page_layout</h3>
	<p>$nuptial_page_layout_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-th"></i></div>
	<h3>$nuptial_unlimited_sidebar</h3>
	<p>$nuptial_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>$nuptial_custom_widget</h3>
	<p>$nuptial_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>$nuptial_portfolio</h3>
	<p>$nuptial_portfolio_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-font"></i></div>
	<h3>$nuptial_typography</h3>
	<p>$nuptial_typography_details</p>
</div>
<div class="one-third column clear">
	<div class="icon-wrap"><i class="fa  fa-5x fa-slideshare"></i></div>
	<h3>$nuptial_slider</h3>
	<p>$nuptial_slider_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-shopping-cart"></i></div>
	<h3>$nuptial_woocommerce</h3>
	<p>$nuptial_woocommerce_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$nuptial_retina_ready</h3>
	<p>$nuptial_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>$nuptial_icons</h3>
	<p>$nuptial_icons_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-magic"></i></div>
	<h3>$nuptial_support</h3>
	<p>$nuptial_support_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-desktop"></i></div>
	<h3>$nuptial_responsive_layout</h3>
	<p>$nuptial_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>$nuptial_testimonials</h3>
	<p>$nuptial_testimonials_details</p>
</div>
<div class="one-third column"> 
	<div class="icon-wrap"><i class="fa  fa-5x fa-skype"></i></div>
	<h3>$nuptial_social_media</h3>
	<p>$nuptial_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>$nuptial_google_map</h3>
	<p>$nuptial_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>$nuptial_customization</h3>
	<p>$nuptial_customization_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-check"></i></div>
	<h3>$nuptial_demo_content</h3>
	<p>$nuptial_demo_content_details</p>
</div>
<div class="one-third column">
	<div class="icon-wrap"><i class="fa  fa-5x fa-signal"></i></div>
	<h3>$nuptial_improvement</h3>
	<p>$nuptial_improvement_details</p>
</div>
FEATURES;

function nuptial_theme_page() { 
	$title = esc_html(__('Nuptial Theme','nuptial'));  
	add_theme_page( 
		esc_html(__( 'Upgrade To Nuptial Pro','nuptial')),
		$title.'<i class="fa fa-plane theme-icon"></i>', 
		'edit_theme_options',
		'nuptial_upgrade',
		'nuptial_display_upgrade'
	);
}

add_action('admin_menu','nuptial_theme_page');


function nuptial_display_upgrade() {
  $theme_data = wp_get_theme('nuptial'); 
    
    // Check for current viewing tab
    $tab = null;
    if ( isset( $_GET['tab'] ) ) {
        $tab = $_GET['tab'];
    } else {
        $tab = null;
    } 
      
    $pro_theme_url = 'https://www.webulousthemes.com/theme/nuptial-pro/';
    $doc_url  = 'https://www.webulousthemes.com/nuptial-free';
    $support_url = 'https://www.webulousthemes.com/free-support-request/';   
    
    $current_action_link =  admin_url( 'themes.php?page=nuptial_upgrade&tab=pro_features' ); ?>
    <div class="nuptial-wrapper about-wrap">
        <h1><?php printf( esc_html__('Welcome to %1$s - Version %2$s', 'nuptial'), $theme_data->Name ,$theme_data->Version ); ?></h1><?php echo
       	sprintf( '<div class="about-text">%1$s</div>',__('Nuptial is an elegant, responsive WordPress theme designed for wedding websites. It is an attractive, modern, easy to use and colorful design and stunning flexibility. However, due to its flexibility and easiness it can be used to create any types of sites. this Theme build in customizer it is very easy to use and user friendly. Theme includes lots of features.','nuptial') ); ?>
        <a href="https://www.webulousthemes.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 - $39', 'nuptial'), $theme_data->Name ); ?></a></p>

	   <h2 class="nav-tab-wrapper">
	        <a href="?page=nuptial_upgrade" class="nav-tab<?php echo is_null($tab) ? ' nav-tab-active' : null; ?>"><?php echo $theme_data->Name; ?></a>
	        <a href="?page=nuptial_upgrade&tab=pro_features" class="nav-tab<?php echo $tab == 'pro_features' ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'PRO Features', 'nuptial' );  ?></a>
            <a href="?page=nuptial_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', 'nuptial' ); ?></a>
	        <?php do_action( 'nuptial_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?','nuptial'),__('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.','nuptial') ); ?>
							</div>
							<div class="image-wrap">
								<?php echo sprintf ( '<img src="'. esc_url( get_template_directory_uri() ) .'/images/api.png" alt="%1$s" />',__('Image','nuptial') ); ?>
							</div>
						</a>
					</div>
                    <div class="theme_info_left">
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Customizer', 'nuptial' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('%s supports the Theme Customizer for all theme settings. Click "Customize" to start customize your site.', 'nuptial'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo admin_url('customize.php'); ?>" class="button button-primary"><?php esc_html_e('Start Customize', 'nuptial'); ?></a>
                            </p>
                        </div>
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Theme Documentation', 'nuptial' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Need any help to setup and configure %s? Please have a look at our documentations instructions.', 'nuptial'), $theme_data->Name); ?></p>
                            <p>
                                <a href="<?php echo esc_url($doc_url); ?>" target="_blank" class="button button-secondary"><?php esc_html_e(' Documentation', 'nuptial'); ?></a>
                            </p>
                            <?php do_action( 'nuptial_dashboard_theme_links' ); ?>
                        </div>  
                        <div class="theme_link">
                            <h3><?php esc_html_e( 'Having Trouble, Need Support?', 'nuptial' ); ?></h3>
                            <p class="about"><?php printf(esc_html__('Support for %s WordPress theme is conducted through Webulous free support ticket system.', 'nuptial'), $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', 'nuptial'), $theme_data->Name); ?></a>
                            </p>
                        </div> 
                       
                    </div>  

                    <div class="theme_info_right">
                        <?php echo sprintf ( '<img src="'. esc_url( get_template_directory_uri() ) .'/screenshot.png" alt="%1$s" />',__('Theme screenshot','nuptial') ); ?>
                    </div>
                </div>
            </div>
        <?php } ?>

         <?php if ( $tab == 'one_click_demo' ) { ?>
            <div class="one-click-demo-tab info-tab-content">
				<div class="wrap clearfix">
					<?php
					if( ! function_exists('is_plugin_activate') ) {
						include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
					}
					if ( nuptial_is_plugin_installed('One Click Demo Import') != 1 ) {
						echo sprintf('%1$s <a href="%2$s"> %3$s</a>', __('Install required plugin to import the demo content.','nuptial'), admin_url('themes.php?page=tgmpa-install-plugins&plugin_status=install'), __('Begin Installing Plugin','nuptial') );
					} elseif ( is_plugin_active( 'one-click-demo-import/one-click-demo-import.php' ) ) {	
						echo sprintf('<a href="%1$s"> %2$s</a>',  admin_url('themes.php?page=pt-one-click-demo-import'), __('Click here to install the demo','nuptial') );
				    } else {
				    	echo sprintf('%1$s <a href="%2$s"> %3$s</a>', __('Kindly activate the Required plugin to Import the demo content.','nuptial'), admin_url('themes.php?page=tgmpa-install-plugins&plugin_status=activate'), __('Begin Activating Plugin','nuptial') );
				    } ?>
				</div>
			</div><?php   
		} ?> 

        <?php if ( $tab == 'pro_features' ) { ?>
            <div class="pro-features-tab info-tab-content"><?php
			    global $nuptial_why_upgrade; ?>
				<div class="wrap clearfix">
				    <?php echo $nuptial_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 esc_html($theme_data->Name); ?> Lite</th>
			                    <th><?php echo esc_html($theme_data->Name); ?> PRO</th>
			                </tr>
		                </thead>
		                <tbody>
		                    <tr>
		                        <td><h3><?php _e('Flex Slider', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial'); ?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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', 'nuptial');?></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 - $39', 'nuptial'), $theme_data->Name ); ?></a></td>
		                    </tr>
		                </tbody>
	                </table>			    
				</div>
			</div><?php 
		} ?>

    </div><?php
}
   

	$options = array(
		'capability' => 'edit_theme_options',
		'type' => 'theme_mod',
		'panels' => apply_filters( 'nuptial_customizer_options', array(
			'nuptial' => array(
				'priority'       => 9,
				'title'          => __('Theme Options', 'nuptial'),
				'description'    => __('Theme Options', 'nuptial'),
				'sections' => array(
					'general' => array(
						'title' => __('General', 'nuptial'),
						'description' => __('General settings that affects overall site', 'nuptial'),
						'fields' => array(
							'breadcrumb' => array(
								'type' => 'checkbox',
								'label' => __('Enable Breadcrumb', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'breadcrumb_char' => array(
								'type' => 'select',
								'label' => __('Select Breadcrumb Character', 'nuptial'),
								'choices' => array(
									'1' => '&raquo;',
									'2' => '&#47;',
									'3' => '&gt;'
								),
								'sanitize_callback' => 'nuptial_breadcrumb_char_choices',
								'default' => '1',
							),
							 'numeric_pagination' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Numeric Page Navigation', 'nuptial'),
                                'description' => __('Check to display numeric page navigation, instead of Previous Posts / Next Posts links.', 'nuptial'),
                                'default' => 1, 
                                'sanitize_callback' => 'nuptial_boolean', 
                            ),
                            'sidebar_position' => array(
                                'type' => 'radio',
                                'label' => __('Website Layout Options', 'nuptial'),
                                'description' => __('Select main content and sidebar alignment.', 'nuptial'),
                                'choices' => array(
                                    'left' => __('Sidebar Left', 'nuptial'),
                                    'right' => __('Sidebar Right', 'nuptial'),
                                    'fullwidth' => __('Full Width', 'nuptial'),
                                    'no-sidebar' => __('No Sidebar', 'nuptial'),
                                ),
                                'default' => 'right',  
                                'sanitize_callback' => 'sanitize_text_field', 
                            ),
						),
					),
					'header' => array(
						'title' => __('Header', 'nuptial'),
						'description' => __('Header options', 'nuptial'),
						'fields' => array(
							'logo_title' => array(
								'type' => 'checkbox',
								'label' => __('Logo as Title', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'tagline' => array(
								'type' => 'checkbox',
								'label' => __('Show site Tagline', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',
							),
						),
					),
					'footer' => array(
						'title' => __('Footer', 'nuptial'),
						'description' => __('Footer related options', 'nuptial'),
						'fields' => array(
							'footer_widgets' => array(
								'type' => 'checkbox',
								'label' => __('Footer Widget Area', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'scroll_to_top' => array(
								'type' => 'checkbox',
								'label' => __('Enable Scroll To Top', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'copyright' => array(
                                'type' => 'textarea',
                                'label' => __('Footer Copyright Text (Validated that it\'s HTML Allowed)', 'nuptial'),
                                'description' => __('HTML Allowed. <b>This field is even HTML validated! </b>', 'nuptial'),
                                'sanitize_callback' => 'nuptial_footer_copyright',
                            ),
						),
					),
					'home' => array(
						'title' => __('Home', 'nuptial'),
						'description' => __('Home Page options', 'nuptial'),
						'fields' => array(
							'slider_field' => array(   
								'type' => 'checkbox',
								'label' => __('Enable Home Page Slider Section', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'slider_cat' => array(
								'type' => 'category',
								'label' => __('Slider Posts Category', 'nuptial'),
								'sanitize_callback' => 'absint',
							),
							'slider_count' => array(
								'type' => 'text',
								'label' => __('No. of Sliders', 'nuptial'),
								'sanitize_callback' => 'absint',
								'default' => 3,
							),
							'service_field' => array(   
								'type' => 'checkbox',
								'label' => __('Enable Home Page Service Section', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'service_title' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Title', 'nuptial'),
								'sanitize_callback' => 'absint',
							),
							'service_1' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #1', 'nuptial'),
								'sanitize_callback' => 'absint',
							), 
							'service_2' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #2', 'nuptial'),
								'sanitize_callback' => 'absint',
							),
							'service_3' => array(
								'type' => 'dropdown-pages',
								'label' => __('Service Section #3', 'nuptial'),
								'sanitize_callback' => 'absint',
							), 
							'enable_recent_post_service' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Home Page Recent Post Section', 'nuptial'),
                                'default' => 1,
                                'sanitize_callback' => 'nuptial_boolean',  
                            ),
                            'recent_post_title' => array(
								'type' => 'dropdown-pages',
								'label' => __('Recent Post Title', 'nuptial'),
								'sanitize_callback' => 'absint',
							), 
							'recent_posts_count' => array(
								'type' => 'text',
								'label' => __('No. of Recent Posts', 'nuptial'),
								'sanitize_callback' => 'absint',
								'default' => 3,  
							), 
							'recent_posts_exclude' => array(
								'type' => 'text',
								'label' => __('Exclude the Posts from Home Page. Post IDs, separated by commas.', 'nuptial'),
								'sanitize_callback' => 'sanitize_text_field', 
							),
							'enable_home_default_content' => array(
                                'type' => 'checkbox',
                                'label' => __('Enable Home Page Default Content', 'nuptial'),
                                'default' => 0,  
                                'sanitize_callback' => 'nuptial_boolean',
                            ),
						),
					),
					'blog' => array(
						'title' => __('Blog', 'nuptial'),
						'description' => __('Blog Related Posts options', 'nuptial'),
						'fields' => array(
							'featured_image' => array(  
								'type' => 'checkbox',
								'label' => __('Enable Featured Image', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
                           'featured_image_size' => array(
                                'type' => 'radio',
                                'label' => __('Choose the featured image display type for Blog Page ', 'nuptial'),
                                'choices' => array(
                                    '1' => __('Large Featured Image', 'nuptial'),
                                    '2' => __('Small Featured Image', 'nuptial'),        
                                ),
                                'default' => '1', 
                                'sanitize_callback' => 'absint',
                            ),
						),
					),
					'single_blog' => array(
						'title' => __('Single Blog', 'nuptial'),
						'description' => __('Single Blog page Related Posts options', 'nuptial'),
						'fields' => array(
							'single_featured_image' => array(
								'type' => 'checkbox',
								'label' => __('Enable Single Post Featured Image', 'nuptial'),
								'default' => 1,
								'sanitize_callback' => 'nuptial_boolean',
							),
							'single_featured_image_size' => array(
								'type' => 'radio',
								'label' => __('Choose the featured image display type for Single Page ', 'nuptial'),
								'choices' => array(
									'1' => __('Large Featured Image', 'nuptial'),
									'2' => __('Small Featured Image', 'nuptial'),       
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',  
							),
							'social_sharing_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Social Sharing Box below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'facebook_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Facebook Sharing option below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'twitter_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Twitter Sharing option below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'linkedin_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Linkedin Sharing option below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'google-plus_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Google Plus Sharing option below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'email_sb' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Email Sharing option below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'author_bio_box' => array(
								'type' => 'checkbox',
								'label' => __(' Enable Author Bio Box below single post', 'nuptial'),
								'default' => 0,
								'sanitize_callback' => 'nuptial_boolean',    
							),
							'related_posts' => array(
								'type' => 'checkbox',
								'label' => __('Show Related posts', 'nuptial'),
								'default' => 0, 
								'sanitize_callback' => 'nuptial_boolean', 
							),
							'related_posts_hierarchy' => array(
								'type' => 'radio',
								'label' => __('Related Posts Must Be Shown As:', 'nuptial'),
								'choices' => array(
									'1' => __('Related Posts By Tags', 'nuptial'),
									'2' => __('Related Posts By Categories', 'nuptial'),      
								),
								'default' => '1', 
								'sanitize_callback' => 'absint',    
							),
						),
					),

				)
			),
		) 
	)
	);

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

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

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

if ( ! function_exists( 'nuptial_footer_copyright' ) ) {

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

    }
}

