<?php 
	if(isset($_GET['import-demo']) && $_GET['import-demo'] == true){
		// ------- Create Nav Menu --------
		$podcast_streaming_menuname ='Primary Menu';
	    $podcast_streaming_bpmenulocation = 'primary_menu';
	    $podcast_streaming_menu_exists = wp_get_nav_menu_object( $podcast_streaming_menuname );
	    if( !$podcast_streaming_menu_exists){
	        $podcast_streaming_menu_id = wp_create_nav_menu($podcast_streaming_menuname);
	        $podcast_streaming_home_parent = wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
				'menu-item-title' =>  __('Home','podcast-streaming'),
				'menu-item-classes' => 'home',   
				'menu-item-url' =>home_url( '/' ),
				'menu-item-status' => 'publish')
			);                                                                                                        
			wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
	            'menu-item-title' =>  __('Contact','podcast-streaming'),
	            'menu-item-classes' => 'contact',
	            'menu-item-url' => home_url( '//contact/' ),
	            'menu-item-status' => 'publish'));

			wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
	            'menu-item-title' =>  __('Course','podcast-streaming'),
	            'menu-item-classes' => 'course',
	            'menu-item-url' => home_url( '//course/' ),
	            'menu-item-status' => 'publish'));

			
			wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
	            'menu-item-title' =>  __('Shop','podcast-streaming'),
	            'menu-item-classes' => 'shop',
	            'menu-item-url' => home_url( '//shop/' ),
	            'menu-item-status' => 'publish'));

	        wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
	            'menu-item-title' =>  __('Page','podcast-streaming'),
	            'menu-item-classes' => 'pages',
	            'menu-item-url' => home_url( '//pages/' ),
	            'menu-item-status' => 'publish'));

			wp_update_nav_menu_item($podcast_streaming_menu_id, 0, array(
	            'menu-item-title' =>  __('Blog','podcast-streaming'),
	            'menu-item-classes' => 'blog',
	            'menu-item-url' => home_url( '//blog/' ),
	            'menu-item-status' => 'publish'));
	        
			if( !has_nav_menu( $podcast_streaming_bpmenulocation ) ){
	            $locations = get_theme_mod('nav_menu_locations');
	            $locations[$podcast_streaming_bpmenulocation] = $podcast_streaming_menu_id;
	            set_theme_mod( 'nav_menu_locations', $locations );
	        }
	    }
	    $podcast_streaming_home_id='';
		$podcast_streaming_home_content = '';
		$podcast_streaming_home_title = 'Home';
		$podcast_streaming_home = array(
			'post_type' => 'page',
			'post_title' => $podcast_streaming_home_title,
			'post_content' => $podcast_streaming_home_content,
			'post_status' => 'publish',
			'post_author' => 1,
			'post_slug' => 'home'
		);
		$podcast_streaming_home_id = wp_insert_post($podcast_streaming_home);
	    
		add_post_meta( $podcast_streaming_home_id, '_wp_page_template', 'templates/template-homepage.php' );

		update_option( 'page_on_front', $podcast_streaming_home_id );
		update_option( 'show_on_front', 'page' );

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

		set_theme_mod('podcast_streaming_header_button_link','#');
		set_theme_mod('podcast_streaming_header_button_text','Buy Now');

		set_theme_mod('podcast_streaming_top_twitter_link','#');
		set_theme_mod('podcast_streaming_top_linkdin_link','#');
		set_theme_mod('podcast_streaming_top_youtube_link','#');
		set_theme_mod('podcast_streaming_top_facebook_link','#');
		set_theme_mod('podcast_streaming_top_instagram_link','#');
		

		//-----Slider-----//

		set_theme_mod( 'podcast_streaming_slide_on_off', 'on' );

		set_theme_mod('podcast_streaming_slide_count','2');

		$podcast_streaming_slider_sub_title=array('Listeners and Community to Show Their Love', 'A space for listeners and the community to share their love');

		for ($i=1; $i <= 2; $i++) {
			set_theme_mod('podcast_streaming_slider_short_heading'.$i, ' Stream From Anywhere & Track Listeners');
			set_theme_mod('podcast_streaming_slider_main_heading'.$i, $podcast_streaming_slider_sub_title[$i - 1]);
			set_theme_mod('podcast_streaming_slider_button_link'.$i, '#');
			set_theme_mod('podcast_streaming_slider_button_text'.$i, 'Read More');
			set_theme_mod( 'podcast_streaming_slider_image_1' .$i, get_template_directory_uri().'/images/demo-import-images/slides/slider1.png' );
		}

		set_theme_mod( 'podcast_streaming_slider_background_image', get_template_directory_uri().'/images/demo-import-images/slides/slider-bg.png' );		

		//-----Products-----//

		set_theme_mod( 'podcast_streaming_why_join_us_on_off', 'on' );

		set_theme_mod('podcast_streaming_why_join_us_short_heading', 'Dont Miss The Show');
		set_theme_mod('podcast_streaming_industry_why_join_us_heading', 'Don’t miss the show Reserve Online Today');

		set_theme_mod( 'podcast_streaming_courses_count', '2' );

		$podcast_streaming_couses_heading=array('Book Review', 'Interview Series','Culinary Journey', 'Culinary Journey');

		for ($i=1; $i <= 4; $i++) {
			set_theme_mod( 'podcast_streaming_show_image'.$i, get_template_directory_uri().'/images/demo-import-images/show/show'.$i.'.png' );
			set_theme_mod('podcast_streaming_couses_heading'.$i, $podcast_streaming_couses_heading[$i - 1]);
			set_theme_mod('podcast_streaming_show_time'.$i, '9:12 am');
			set_theme_mod('podcast_streaming_show_date'.$i, '13 May 2024');
			set_theme_mod('podcast_streaming_show_podcaster_name'.$i, 'Podcast Jarie Smith');

		}
		

	}
?>