<?php
/**
 * @package Demo Import
 * @since 1.0.0
 */

class ThemeWhizzie {

	protected $version = '1.1.0';

	/** @var string Current theme name, used as namespace in actions. */
	protected $theme_name = '';
	protected $theme_title = '';

	/** @var string Demo Import page slug and title. */
	protected $page_slug = '';
	protected $page_title = '';

	/** @var array Demo Import steps set by user. */
	protected $config_steps = array();
	public $parent_slug;
	/**
	 * Constructor
	 *
	 * @param $rev_orphanage_config	Our config parameters
	*/
	public function __construct( $rev_orphanage_config ) {
		$this->set_vars( $rev_orphanage_config );
		$this->init();
	}

	/**
	 * Set some settings
	 * @since 1.0.0
	 * @param $rev_orphanage_config	Our config parameters
	*/
	public function set_vars( $rev_orphanage_config ) {
		if( isset( $rev_orphanage_config['page_slug'] ) ) {
			$this->page_slug = esc_attr( $rev_orphanage_config['page_slug'] );
		}
		if( isset( $rev_orphanage_config['page_title'] ) ) {
			$this->page_title = esc_attr( $rev_orphanage_config['page_title'] );
		}
		if( isset( $rev_orphanage_config['steps'] ) ) {
			$this->config_steps = $rev_orphanage_config['steps'];
		}

		$current_theme = wp_get_theme();
		$this->theme_title = $current_theme->get( 'Name' );
		$this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) );
		$this->page_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_page_slug', $this->theme_name . '-demoimport' );
		$this->parent_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_parent_slug', '' );
	}

	/**
	 * Hooks and filters
	 * @since 1.0.0
	*/
	public function init() {
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
		add_action( 'admin_menu', array( $this, 'menu_page' ) );
		add_action( 'wp_ajax_setup_widgets', array( $this, 'setup_widgets' ) );
	}

	public function enqueue_scripts() {
		wp_enqueue_style( 'demo-import-style', get_template_directory_uri() . '/demo-import/assets/css/demo-import-style.css');
		wp_register_script( 'demo-import-script', get_template_directory_uri() . '/demo-import/assets/js/demo-import-script.js', array( 'jquery' ), time() );
		wp_localize_script(
			'demo-import-script',
			'rev_orphanage_whizzie_params',
			array(
				'ajaxurl' 		=> admin_url( 'admin-ajax.php' ),
				'wpnonce' 		=> wp_create_nonce( 'whizzie_nonce' ),
				'verify_text'	=> esc_html( 'verifying', 'rev-orphanage' )
			)
		);
		wp_enqueue_script( 'demo-import-script' );
	}

	/**  Make a modal screen for the wizard **/
	public function menu_page() {
		add_menu_page( esc_html( $this->page_title ), esc_html( $this->page_title ), 'manage_options', $this->page_slug, array( $this, 'rev_orphanage_guide' ) ,'',40);
	}

	/** Make an interface for the wizard **/
	public function wizard_page() {
		/* If we arrive here, we have the filesystem */ ?>
		<div class="wrap">
			<?php echo '<div class="whizzie-wrap">';
				// The wizard is a list with only one item visible at a time
				$steps = $this->get_steps();
				echo '<ul class="whizzie-nav wizard-icon-nav">';?>
				<?php
					$stepI=1;
					foreach( $steps as $step ) {
						$stepAct=($stepI ==1)? 1 : 0;
						if( isset( $step['icon_text'] ) && $step['icon_text'] ) {
							echo '<li class="commom-cls nav-step-' . esc_attr( $step['id'] ) . '" wizard-steps="step-'.esc_attr( $step['id'] ).'" data-enable="'.$stepAct.'">
							<p>'.esc_attr( $step['icon_text'] ).'</p>
							</li>';
						}
					$stepI++;}
			 	echo '</ul>';
				echo '<ul class="whizzie-menu wizard-menu-page">';
				foreach( $steps as $step ) {
					$class = 'step step-' . esc_attr( $step['id'] );
					echo '<li data-step="' . esc_attr( $step['id'] ) . '" class="' . esc_attr( $class ) . '" >';
						$content = call_user_func( array( $this, $step['view'] ) );
						printf('<div class="wizard-button-wrapper">');
							if( isset( $step['button_text_one'] )) {
								printf(
									'<div class="button-wrap button-wrap-one">
										<a href="#" class="button button-primary do-it" data-callback="install_widgets" data-step="widgets"><p class="demo-type-text">%s</p></a>
									</div>',
									esc_html( $step['button_text_one'] )
								);
							}
						printf('</div>');
					echo '</li>';
				}
				echo '</ul>';
				?>
				<div class="step-loading"><span class="spinner">
					<img src="<?php echo esc_url(get_template_directory_uri().'/demo-import/assets/images/Spinner-Animaion.gif'); ?>">
				</span></div>
			<?php echo '</div>';?>
		</div>
	<?php }

	/**
	 * Set options for the steps
	 * @return Array
	*/
	public function get_steps() {
		if ( get_option('rev_orphanage_demo_imported') ) {
			return array(
				'done' => array(
					'id'        => 'done',
					'title'     => __( 'All Done', 'rev-orphanage' ),
					'icon'      => 'yes',
					'view'      => 'get_step_done',
					'callback'  => '',
					'icon_text' => 'View Site'
				)
			);
		}

		$dev_steps = $this->config_steps;
		$steps = array(
			'widgets' => array(
				'id'			=> 'widgets',
				'title'			=> __( 'Customizer', 'rev-orphanage' ),
				'icon'			=> 'welcome-widgets-menus',
				'view'			=> 'get_step_widgets',
				'callback'		=> 'install_widgets',
				'button_text_one'	=> __( 'Import Demo', 'rev-orphanage' ),
				'can_skip'		=> true,
				'icon_text'      => 'Import Demo'
			),
			'done' => array(
				'id'			=> 'done',
				'title'			=> __( 'All Done', 'rev-orphanage' ),
				'icon'			=> 'yes',
				'view'			=> 'get_step_done',
				'callback'		=> '',
				'icon_text'      => 'Done'
			)
		);
		// Iterate through each step and replace with dev config values
		if( $dev_steps ) {
			// Configurable elements - these are the only ones the dev can update from config.php
			$can_config = array( 'title', 'icon', 'button_text', 'can_skip' );
			foreach( $dev_steps as $dev_step ) {
				// We can only proceed if an ID exists and matches one of our IDs
				if( isset( $dev_step['id'] ) ) {
					$id = $dev_step['id'];
					if( isset( $steps[$id] ) ) {
						foreach( $can_config as $element ) {
							if( isset( $dev_step[$element] ) ) {
								$steps[$id][$element] = $dev_step[$element];
							}
						}
					}
				}
			}
		}
		return $steps;
	}

	/**    Print the content for the intro step     **/
		public function get_step_importer() { ?>
		<div class="summary">
			<p>
				<?php esc_html_e('Thank you for choosing this Rev Orphanage Theme. Using this quick setup wizard, you will be able to configure your new website and get it running in just a few minutes. Just follow these simple steps mentioned in the wizard and get started with your website.','rev-orphanage'); ?>
			</p>
		</div>
	<?php }

	/**   Print the content for the widgets step   **/
	public function get_step_widgets() { ?>
		<div class="summary">
			<p>
				<?php esc_html_e('This theme allows you to import demo content and add widgets. Install them using the button below. You can also update or deactivate them using the Customizer.','rev-orphanage'); ?>
			</p>
		</div>
	<?php }

	/** Print the content for the final step **/
	public function get_step_done() { ?>

		<div class="setup-finish">
			<p>
				<?php echo esc_html('Your demo content has been imported successfully. Click the finish button for more information.'); ?>
			</p>
			<div class="finish-buttons">
				<a href="<?php echo esc_url( admin_url( 'themes.php?page=rev-orphanage-getstart-page' ) ); ?>" class="wz-btn-customizer" target="_blank"><?php esc_html_e('About Rev Orphanage','rev-orphanage') ?></a>
				<a href="<?php echo esc_url(admin_url('/customize.php')); ?>" class="wz-btn-customizer" target="_blank"><?php esc_html_e('Customize Your Demo','rev-orphanage') ?></a>
				<a href="<?php echo esc_url(home_url()); ?>" class="wz-btn-visit-site" target="_blank"><?php esc_html_e('Visit Your Site','rev-orphanage'); ?></a>
			</div>
			<div class="finish-buttons">
				<a href="<?php echo esc_url(admin_url()); ?>" class="button button-primary"><?php esc_html_e('Finish','rev-orphanage'); ?></a>
			</div>
		</div>

	<?php }


	public function theme_create_customizer_nav_menu() {
		// ------- Create Primary Menu --------
		$rev_orphanage_themename = 'Rev Orphanage'; // Ensure the theme name is set
		$rev_orphanage_menuname = $rev_orphanage_themename . ' Primary Menu';
		$rev_orphanage_menulocation = 'menu-1';
		$rev_orphanage_menu_exists = wp_get_nav_menu_object($rev_orphanage_menuname);

		if (!$rev_orphanage_menu_exists) {
			$rev_orphanage_menu_id = wp_create_nav_menu($rev_orphanage_menuname);

			// Home
			wp_update_nav_menu_item($rev_orphanage_menu_id, 0, array(
				'menu-item-title' => __('Home', 'rev-orphanage'),
				'menu-item-classes' => 'home',
				'menu-item-url' => home_url('/'),
				'menu-item-status' => 'publish'
			));

			// About
			$rev_orphanage_page_about = get_page_by_path('about');
			if($rev_orphanage_page_about){
				wp_update_nav_menu_item($rev_orphanage_menu_id, 0, array(
					'menu-item-title' => __('About', 'rev-orphanage'),
					'menu-item-classes' => 'about',
					'menu-item-url' => get_permalink($rev_orphanage_page_about),
					'menu-item-status' => 'publish'
				));
			}

			// Services
			$rev_orphanage_page_services = get_page_by_path('services');
			if($rev_orphanage_page_services){
				wp_update_nav_menu_item($rev_orphanage_menu_id, 0, array(
					'menu-item-title' => __('Services', 'rev-orphanage'),
					'menu-item-classes' => 'services',
					'menu-item-url' => get_permalink($rev_orphanage_page_services),
					'menu-item-status' => 'publish'
				));
			}

			// Blog
			$rev_orphanage_page_blog = get_page_by_path('blog');
			if($rev_orphanage_page_blog){
				wp_update_nav_menu_item($rev_orphanage_menu_id, 0, array(
					'menu-item-title' => __('Blog', 'rev-orphanage'),
					'menu-item-classes' => 'blog',
					'menu-item-url' => get_permalink($rev_orphanage_page_blog),
					'menu-item-status' => 'publish'
				));
			}

			// Contact Us
			$rev_orphanage_page_contact = get_page_by_path('contact');
			if($rev_orphanage_page_contact){
				wp_update_nav_menu_item($rev_orphanage_menu_id, 0, array(
					'menu-item-title' => __('Contact Us', 'rev-orphanage'),
					'menu-item-classes' => 'contact',
					'menu-item-url' => get_permalink($rev_orphanage_page_contact),
					'menu-item-status' => 'publish'
				));
			}

			// Assign menu to location if not set
			if (!has_nav_menu($rev_orphanage_menulocation)) {
				$rev_orphanage_locations = get_theme_mod('nav_menu_locations');
				$rev_orphanage_locations[$rev_orphanage_menulocation] = $rev_orphanage_menu_id; // Use $rev_orphanage_menu_id here
				set_theme_mod('nav_menu_locations', $rev_orphanage_locations);
			}
		}
	}

	/**
	* Imports the Demo Content
	* @since 1.1.0
	*/
	public function setup_widgets() {

		//................................................. MENU PAGES .................................................//
		
		$rev_orphanage_home_id='';
		$rev_orphanage_home_content = '';

		$rev_orphanage_home_title = 'Home';
		$rev_orphanage_home = array(
				'post_type' => 'page',
				'post_title' => $rev_orphanage_home_title,
				'post_content'  => $rev_orphanage_home_content,
				'post_status' => 'publish',
				'post_author' => 1,
				'post_slug' => 'home'
		);
		$rev_orphanage_home_id = wp_insert_post($rev_orphanage_home);

		//Set the home page template
		add_post_meta( $rev_orphanage_home_id, '_wp_page_template', 'revolution-home.php' );

		//Set the static front page
		$rev_orphanage_home = get_page_by_title( 'Home' );
		update_option( 'page_on_front', $rev_orphanage_home->ID );
		update_option( 'show_on_front', 'page' );


		// Create a posts page and assign the template
		$rev_orphanage_blog_title = 'Blog';
		$rev_orphanage_blog_check = get_page_by_path('blog');
		if (!$rev_orphanage_blog_check) {
			$rev_orphanage_blog = array(
				'post_type'    => 'page',
				'post_title'   => $rev_orphanage_blog_title,
				'post_status'  => 'publish',
				'post_author'  => 1,
				'post_name'    => 'blog' // Unique slug for the blog page
			);
			$rev_orphanage_blog_id = wp_insert_post($rev_orphanage_blog);

			// Set the posts page
			if (!is_wp_error($rev_orphanage_blog_id)) {
				update_option('page_for_posts', $rev_orphanage_blog_id);
			}
		}

		// Create a Contact Us page and assign the template
		$rev_orphanage_contact_title = 'Contact Us';
		$rev_orphanage_contact_check = get_page_by_path('contact');
		if (!$rev_orphanage_contact_check) {
			$rev_orphanage_contact = array(
				'post_type'    => 'page',
				'post_title'   => $rev_orphanage_contact_title,
				'post_content'   => '"More About The Free Charity WordPress Theme"
										The Free Charity WordPress Theme stands out with its highly responsive design and integrated social media features, making it ideal for mobile-first audiences. This theme’s seamless compatibility across devices allows charities to connect with supporters wherever they are, ensuring that content remains accessible and attractive on desktops, tablets, and phones alike. Built-in social media links provide easy avenues for sharing updates and raising awareness, helping charities reach a larger audience with each post. The donation functionality is also a key feature, streamlining the giving process with prominent call-to-action buttons that encourage viewers to contribute and support the cause actively. These buttons are designed to remain visible and accessible on every screen size, ensuring that information and calls to action are always effective, helping nonprofits build a stronger, more engaged community.

										The Free Charity WordPress Theme includes valuable features like volunteer signup forms and event scheduling, fostering a strong sense of community and encouraging active participation. Volunteers can easily register through dedicated forms, while an integrated events calendar keeps supporters informed about upcoming fundraisers, community programs, and health camps. This functionality is essential for charities running multiple campaigns, helping them engage with their community in real-time and organise impactful events seamlessly. Supporters can stay updated on orphans’ vaccination drives, medical support camps, and awareness programs, making it easy for them to participate in meaningful ways. These features not only streamline operations but also strengthen community bonds, creating an environment where every event is a chance to support and uplift the organisation’s mission. By simplifying event management and volunteer coordination, the theme effectively supports charities in amplifying their outreach and impact.

										Customizability is a standout benefit of the Free Charity WordPress Theme, enabling charities to tailor the theme to reflect their unique branding and mission. From customizable banners to dedicated testimonial sections, the theme’s personalization options are designed to showcase each charity’s supporters, success stories, and impactful activities. The retina-ready, fast-loading design ensures that visitors experience a visually appealing, professional-looking platform that performs seamlessly. This makes the theme particularly advantageous for nonprofits working across diverse causes—from emergency rescue operations to child safety programs—by providing an adaptable foundation to build awareness and mobilise support. The theme’s responsive layout also supports community engagement, allowing visitors to connect and participate through any device. Overall, it’s a visually striking and practical choice that empowers charities to expand their reach, grow their volunteer base, and amplify their message effectively.',
					'post_status'  => 'publish',
				'post_author'  => 1,
				'post_name'    => 'contact' // Unique slug for the Contact Us page
			);
			wp_insert_post($rev_orphanage_contact);
		}

		// Create a About page and assign the template
		$rev_orphanage_about_title = 'About';
		$rev_orphanage_about_check = get_page_by_path('about');
		if (!$rev_orphanage_about_check) {
			$rev_orphanage_about = array(
				'post_type'    => 'page',
				'post_title'   => $rev_orphanage_about_title,
				'post_content'   => '"More About The Free Charity WordPress Theme"
										The Free Charity WordPress Theme stands out with its highly responsive design and integrated social media features, making it ideal for mobile-first audiences. This theme’s seamless compatibility across devices allows charities to connect with supporters wherever they are, ensuring that content remains accessible and attractive on desktops, tablets, and phones alike. Built-in social media links provide easy avenues for sharing updates and raising awareness, helping charities reach a larger audience with each post. The donation functionality is also a key feature, streamlining the giving process with prominent call-to-action buttons that encourage viewers to contribute and support the cause actively. These buttons are designed to remain visible and accessible on every screen size, ensuring that information and calls to action are always effective, helping nonprofits build a stronger, more engaged community.

										The Free Charity WordPress Theme includes valuable features like volunteer signup forms and event scheduling, fostering a strong sense of community and encouraging active participation. Volunteers can easily register through dedicated forms, while an integrated events calendar keeps supporters informed about upcoming fundraisers, community programs, and health camps. This functionality is essential for charities running multiple campaigns, helping them engage with their community in real-time and organise impactful events seamlessly. Supporters can stay updated on orphans’ vaccination drives, medical support camps, and awareness programs, making it easy for them to participate in meaningful ways. These features not only streamline operations but also strengthen community bonds, creating an environment where every event is a chance to support and uplift the organisation’s mission. By simplifying event management and volunteer coordination, the theme effectively supports charities in amplifying their outreach and impact.

										Customizability is a standout benefit of the Free Charity WordPress Theme, enabling charities to tailor the theme to reflect their unique branding and mission. From customizable banners to dedicated testimonial sections, the theme’s personalization options are designed to showcase each charity’s supporters, success stories, and impactful activities. The retina-ready, fast-loading design ensures that visitors experience a visually appealing, professional-looking platform that performs seamlessly. This makes the theme particularly advantageous for nonprofits working across diverse causes—from emergency rescue operations to child safety programs—by providing an adaptable foundation to build awareness and mobilise support. The theme’s responsive layout also supports community engagement, allowing visitors to connect and participate through any device. Overall, it’s a visually striking and practical choice that empowers charities to expand their reach, grow their volunteer base, and amplify their message effectively.',
					'post_status'  => 'publish',
				'post_author'  => 1,
				'post_name'    => 'about' // Unique slug for the About page
			);
			wp_insert_post($rev_orphanage_about);
		}

		// Create a Services page and assign the template
		$rev_orphanage_services_title = 'Services';
		$rev_orphanage_services_check = get_page_by_path('services');
		if (!$rev_orphanage_services_check) {
			$rev_orphanage_services = array(
				'post_type'    => 'page',
				'post_title'   => $rev_orphanage_services_title,
				'post_content'   => '"More About The Free Charity WordPress Theme"
										The Free Charity WordPress Theme stands out with its highly responsive design and integrated social media features, making it ideal for mobile-first audiences. This theme’s seamless compatibility across devices allows charities to connect with supporters wherever they are, ensuring that content remains accessible and attractive on desktops, tablets, and phones alike. Built-in social media links provide easy avenues for sharing updates and raising awareness, helping charities reach a larger audience with each post. The donation functionality is also a key feature, streamlining the giving process with prominent call-to-action buttons that encourage viewers to contribute and support the cause actively. These buttons are designed to remain visible and accessible on every screen size, ensuring that information and calls to action are always effective, helping nonprofits build a stronger, more engaged community.

										The Free Charity WordPress Theme includes valuable features like volunteer signup forms and event scheduling, fostering a strong sense of community and encouraging active participation. Volunteers can easily register through dedicated forms, while an integrated events calendar keeps supporters informed about upcoming fundraisers, community programs, and health camps. This functionality is essential for charities running multiple campaigns, helping them engage with their community in real-time and organise impactful events seamlessly. Supporters can stay updated on orphans’ vaccination drives, medical support camps, and awareness programs, making it easy for them to participate in meaningful ways. These features not only streamline operations but also strengthen community bonds, creating an environment where every event is a chance to support and uplift the organisation’s mission. By simplifying event management and volunteer coordination, the theme effectively supports charities in amplifying their outreach and impact.

										Customizability is a standout benefit of the Free Charity WordPress Theme, enabling charities to tailor the theme to reflect their unique branding and mission. From customizable banners to dedicated testimonial sections, the theme’s personalization options are designed to showcase each charity’s supporters, success stories, and impactful activities. The retina-ready, fast-loading design ensures that visitors experience a visually appealing, professional-looking platform that performs seamlessly. This makes the theme particularly advantageous for nonprofits working across diverse causes—from emergency rescue operations to child safety programs—by providing an adaptable foundation to build awareness and mobilise support. The theme’s responsive layout also supports community engagement, allowing visitors to connect and participate through any device. Overall, it’s a visually striking and practical choice that empowers charities to expand their reach, grow their volunteer base, and amplify their message effectively.',
					'post_status'  => 'publish',
				'post_author'  => 1,
				'post_name'    => 'services' // Unique slug for the Services page
			);
			wp_insert_post($rev_orphanage_services);
		}


		// ------------------------------------------ Header -------------------------------------- //

			set_theme_mod('rev_orphanage_header_info_phone','+00 123 456 78900');
			set_theme_mod('rev_orphanage_header_info_email','charity1245@example.com');

			set_theme_mod('rev_orphanage_facebook_link_option','#');
			set_theme_mod('rev_orphanage_twitter_link_option','#');
			set_theme_mod('rev_orphanage_instagram_link_option','#');
			set_theme_mod('rev_orphanage_linkedin_link_option','#');
			set_theme_mod('rev_orphanage_pinterest_link_option','#');
			set_theme_mod('rev_orphanage_youtube_link_option','#');


		// ------------------------------------------ Slider Section -------------------------------------- //

			set_theme_mod('rev_orphanage_enable_slider',1);
			set_theme_mod('rev_orphanage_service_enable',1);

			for($i=1;$i<=3;$i++){
				set_theme_mod( 'rev_orphanage_slider_image'.$i,get_template_directory_uri().'/revolution/assets/images/slider'.$i.'.png' );
				set_theme_mod( 'rev_orphanage_slider_top_text'.$i, 'ALL WAYS HELP US!' );
				set_theme_mod( 'rev_orphanage_slider_heading'.$i, 'EVERY PEOPLE THIS' );
				set_theme_mod( 'rev_orphanage_slider_subheading'.$i, 'GET SOOME FOOD' );
				set_theme_mod( 'rev_orphanage_slider_text'.$i, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.' );
				set_theme_mod( 'rev_orphanage_slider_button1_text'.$i, 'REQUEST FUND RISE' );
				set_theme_mod( 'rev_orphanage_slider_button1_link'.$i, '#' );
				set_theme_mod( 'rev_orphanage_slider_button2_text'.$i, 'DONATE NOW' );
				set_theme_mod( 'rev_orphanage_slider_button2_link'.$i, '#' );
			}

		// ------------------------------------------ About Section -------------------------------------- //

			set_theme_mod('rev_orphanage_service_about_us','WELCOME TO CHARITY LTD.');
			set_theme_mod('rev_orphanage_service_sub_heading','We Believe This Lifes About Give For Poor People.');
			set_theme_mod( 'rev_orphanage_about_bg',get_template_directory_uri().'/revolution/assets/images/about.png' );
			
			$rev_orphanage_tab_heading=array('Imfactfull causes','Start Donate','Convenient & Secure','Become Volunteer');
			$rev_orphanage_tab_para=array('Lorem ipsum dolor sit amet.','Lorem ipsum dolor sit amet.','Lorem ipsum dolor sit amet.','Lorem ipsum dolor sit amet.');
			$rev_orphanage_tab_icon=array('fas fa-dollar-sign','fas fa-hand-holding-heart','fas fa-lock','fas fa-headset');
			for($i=1;$i<=4;$i++) {
				set_theme_mod( 'rev_orphanage_tab_heading'.$i, $rev_orphanage_tab_heading[$i-1] );
				set_theme_mod( 'rev_orphanage_tab_para'.$i, $rev_orphanage_tab_para[$i-1] );
				set_theme_mod( 'rev_orphanage_tab_icon'.$i, $rev_orphanage_tab_icon[$i-1] );
			}

			set_theme_mod('rev_orphanage_abt_button','MORE ABOUT');
			set_theme_mod('rev_orphanage_abt_link','#');
			set_theme_mod('rev_orphanage_charity_experience','21+');
			set_theme_mod('rev_orphanage_header_search',true);
			
			
  	 	$this->theme_create_customizer_nav_menu();
		update_option('rev_orphanage_demo_imported', true);
	}

	public function rev_orphanage_guide() {
		$display_string = '';
		$return = add_query_arg( array()) ;
		$theme = wp_get_theme( 'rev-orphanage' );
		?>
		<div class="wrapper-info get-stared-page-wrap">
			<div class="wrapper-info-content">
				<div class="buynow__">
					<h2><?php esc_html_e( 'Welcome to Rev Orphanage', 'rev-orphanage' ); ?> <span class="version">Version: <?php echo esc_html($theme['Version']);?></span></h2>
					<p><?php esc_html_e('The quick setup wizard will assist you in configuring your new website. This wizard will import the demo content.', 'rev-orphanage'); ?></p>
				</div>
				<div class="buynow_">
					<a target="_blank" class="buynow_themepage" href="<?php echo esc_url('https://www.revolutionwp.com/products/orphanage-wordpress-theme'); ?>"><?php echo esc_html__('Go Premium Now', 'rev-orphanage'); ?></a>
				</div>
			</div>
			<div class="tab-sec theme-option-tab">
				<div id="demo_offer" class="tabcontent open">
					<?php $this->wizard_page(); ?>
				</div>
			</div>
		</div>
	<?php }
}