<?php
/**
 * One Click Demo
 *
 * @package celebshine
 * @subpackage celebshine
 * @since celebshine 1.0
 */

/**
 * One Click Demo Import Array
 */
function celebshine_import_files() {
	return array(
		array(
			'import_file_name'             => esc_html__( 'Demo 1', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-01/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-01/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-01/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-01/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-01/demo-01.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 2', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-02/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-02/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-02/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-02/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-02/demo-02.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine02/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 3', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-03/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-03/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-03/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-03/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-03/demo-03.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine03/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 4', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-04/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-04/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-04/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-04/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-04/demo-04.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine04/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 5', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-05/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-05/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-05/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-05/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-05/demo-05.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine05/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 6', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-06/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-06/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-06/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-06/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-06/demo-06.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine06/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 7', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-07/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-07/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-07/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-07/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-07/demo-07.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine07/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 8', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-08/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-08/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-08/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-08/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-08/demo-08.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine08/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 9', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-09/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-09/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-09/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-09/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-09/demo-09.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine09/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 10', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-10/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-10/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-10/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-10/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-10/demo-10.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine10/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 11', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-11/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-11/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-11/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-11/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-11/demo-11.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine11/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 12', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-12/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-12/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-12/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-12/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-12/demo-12.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine11/celebshine-12/?footer_style=2',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 13', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-13/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-13/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-13/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-13/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-13/demo-13.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine13/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 14', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-14/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-14/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-14/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-14/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-14/demo-14.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine13/celebshine-14/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 15', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-15/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-15/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-15/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-15/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-15/demo-15.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine15/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 16', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-16/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-16/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-16/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-16/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-16/demo-16.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine16/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 17', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-17/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-17/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-17/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-17/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-17/demo-17.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine17/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 18', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-18/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-18/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-18/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-18/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-18/demo-18.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine18/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 19', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-19/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-19/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-19/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-19/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-19/demo-19.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine19/',
		),
		array(
			'import_file_name'             => esc_html__( 'Demo 20', 'celebshine' ),
			'local_import_file'            => trailingslashit( get_template_directory() ) . 'inc/demo/demo-20/celebshine.xml',
			'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'inc/demo/demo-20/celebshine-widgets.wie',
			'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/demo-20/celebshine-export.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( get_template_directory() ) . 'inc/demo/demo-20/celebshine_options.json',
					'option_name' => 'celebshine_options',
				),
			),
			'import_preview_image_url'     => get_template_directory_uri() . '/inc/demo/demo-20/demo-20.jpg',
			'preview_url'                  => 'https://wordpress.templatetrip.com/WCM002_celebshine/celebshine20/',
		),
	);
}
add_filter( 'pt-ocdi/import_files', 'celebshine_import_files' );

if ( ! function_exists( 'celebshine_after_import' ) ) :

	$args = array(
		'post_type'   => 'elementor_library',
		'meta_query'  => array(
			array(
				'key'   => '_elementor_template_type',
				'value' => 'kit',
			),
		),
	);
	
	$query = get_posts( $args );
	
	if ( ! empty( $query ) && isset( $query[2] ) && isset( $query[2]->ID ) ) {
		update_option( 'elementor_active_kit', $query[2]->ID );
	}


	/**
	 * Menu Setting
	 *
	 * @param array $selected_import .
	 */
	function celebshine_after_import( $selected_import ) {

		// Assign menus to their locations.
		$locations = get_theme_mod( 'nav_menu_locations' ); // registered menu locations in theme
		$menus     = wp_get_nav_menus(); // registered menus

		if ( $menus ) {
			foreach ( $menus as $menu ) { // assign menus to theme locations

				if ( $menu->name == 'Mega Menu' ) {
					$locations['header-menu'] = $menu->term_id;
				}

				if ( $menu->name == 'Humburger Menu' ) {
					$locations['hamburger-menu'] = $menu->term_id;
				}

				if ( $menu->name == 'Information' ) {
					$locations['footer-menu'] = $menu->term_id;
				}
			}
		}
		set_theme_mod( 'nav_menu_locations', $locations );

		if ( 'Demo 1' === $selected_import['import_file_name'] ) {

			// Assign front page and posts page (blog page).
			$front_page_id = get_page_by_title( 'celebshine' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );

			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-01/slider-01.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}

		} elseif ( 'Demo 2' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 2
			$front_page_id = get_page_by_title( 'Celebshine 02' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-02/slider-02.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}

		} elseif ( 'Demo 3' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 3
			$front_page_id = get_page_by_title( 'Celebshine 03' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-03/slider-03.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 4' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 4
			$front_page_id = get_page_by_title( 'Celebshine 04' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-04/slider-04.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 5' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 5
			$front_page_id = get_page_by_title( 'Celebshine 05' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-05/slider-05.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 6' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 6
			$front_page_id = get_page_by_title( 'Celebshine 06' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-06/slider-06.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 7' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 7
			$front_page_id = get_page_by_title( 'Celebshine 07' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-07/slider-07.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 8' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 8
			$front_page_id = get_page_by_title( 'Celebshine 08' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-08/slider-08.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 9' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 9
			$front_page_id = get_page_by_title( 'Celebshine 09' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-09/slider-09.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 10' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 10
			$front_page_id = get_page_by_title( 'Celebshine 10' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-10/slider-10.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 11' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 11
			$front_page_id = get_page_by_title( 'Celebshine 11' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-11/slider-11.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 12' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 12
			$front_page_id = get_page_by_title( 'Celebshine 12' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-12/slider-12.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 13' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 13
			$front_page_id = get_page_by_title( 'Celebshine 13' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-13/slider-13.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 14' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 14
			$front_page_id = get_page_by_title( 'Celebshine 14' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-14/slider-14.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 15' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 15
			$front_page_id = get_page_by_title( 'Celebshine 15' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-15/slider-15.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 16' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 16
			$front_page_id = get_page_by_title( 'Celebshine 16' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-16/slider-16.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 17' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 17
			$front_page_id = get_page_by_title( 'Celebshine 17' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-17/slider-17.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 18' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 18
			$front_page_id = get_page_by_title( 'Celebshine 18' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-18/slider-18.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 19' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 19
			$front_page_id = get_page_by_title( 'Celebshine 19' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-19/slider-19.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		} elseif ( 'Demo 20' === $selected_import['import_file_name'] ) {
			// Same codes as above for the demo 20
			$front_page_id = get_page_by_title( 'Celebshine 20' );
			$blog_page_id  = get_page_by_title( 'Blog' );

			update_option( 'show_on_front', 'page' );
			update_option( 'page_on_front', $front_page_id->ID );
			update_option( 'page_for_posts', $blog_page_id->ID );
			// Import Revolution Slider.
			if ( class_exists( 'RevSlider' ) ) {
				$slider_array = array(
					get_template_directory() . '/inc/demo/demo-20/slider-20.zip',
				);

				$slider = new RevSlider();

				foreach ( $slider_array as $filepath ) {
					$slider->importSliderFromPost( true, true, $filepath );
				}
			}
		}

		// remove default post
		wp_delete_post( 1 );

	}
	add_action( 'pt-ocdi/after_import', 'celebshine_after_import' );
endif;