<div class="theme-offer">
	<?php 
    // Check if the demo import has been completed
    $vw_hosting_services_demo_import_completed = get_option('vw_hosting_services_demo_import_completed', false);

    // If the demo import is completed, display the "View Site" button
    if ($vw_hosting_services_demo_import_completed) {
      echo '<p class="notice-text">' . esc_html__('Your demo import has been completed successfully.', 'vw-hosting-services') . '</p>';
      echo '<span><a href="' . esc_url(home_url()) . '" class="button button-primary site-btn" target="_blank">' . esc_html__('View Site', 'vw-hosting-services') . '</a></span>';
      echo '<span><a href="'. esc_url(admin_url('customize.php') ) .'" class="button button-primary demo-btn" target=_blank>'. esc_html__( 'Customize Your Site', 'vw-hosting-services' ) .'</a></span>';
      echo '<span><a href="'. esc_url( 'https://preview.vwthemesdemo.com/docs/free-vw-hosting-services/' ) .'" class="button button-primary doc-btn" target=_blank>'. esc_html__( 'Free Theme Documentation', 'vw-hosting-services' ) .'</a></span>';    
    }

		// POST and update the customizer and other related data
        if (isset($_POST['submit'])) {

        // Check if woocommerce is installed and activated
        if (!is_plugin_active('woocommerce/woocommerce.php')) {
          // Install the plugin if it doesn't exist
          $vw_hosting_services_plugin_slug = 'woocommerce';
          $vw_hosting_services_plugin_file = 'woocommerce/woocommerce.php';

          // Check if plugin is installed
          $vw_hosting_services_installed_plugins = get_plugins();
          if (!isset($vw_hosting_services_installed_plugins[$vw_hosting_services_plugin_file])) {
              include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
              include_once(ABSPATH . 'wp-admin/includes/file.php');
              include_once(ABSPATH . 'wp-admin/includes/misc.php');
              include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

              // Install the plugin
              $vw_hosting_services_upgrader = new Plugin_Upgrader();
              $vw_hosting_services_upgrader->install('https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip');
          }
          // Activate the plugin
          activate_plugin($vw_hosting_services_plugin_file);
        }

        // Check if ibtana visual editor is installed and activated
        if (!is_plugin_active('yith-woocommerce-subscription/init.php')) {
          // Install the plugin if it doesn't exist
          $vw_hosting_services_plugin_slug = 'yith-woocommerce-subscription';
          $vw_hosting_services_plugin_file = 'yith-woocommerce-subscription/init.php';

          // Check if plugin is installed
          $vw_hosting_services_installed_plugins = get_plugins();
          if (!isset($vw_hosting_services_installed_plugins[$vw_hosting_services_plugin_file])) {
              include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
              include_once(ABSPATH . 'wp-admin/includes/file.php');
              include_once(ABSPATH . 'wp-admin/includes/misc.php');
              include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

              // Install the plugin
              $vw_hosting_services_upgrader = new Plugin_Upgrader();
              $vw_hosting_services_upgrader->install('https://downloads.wordpress.org/plugin/yith-woocommerce-subscription.latest-stable.zip');
          }
          // Activate the plugin
          activate_plugin($vw_hosting_services_plugin_file);
        }


        // Check if ibtana visual editor is installed and activated
        if (!is_plugin_active('ibtana-visual-editor/plugin.php')) {
          // Install the plugin if it doesn't exist
          $vw_hosting_services_plugin_slug = 'ibtana-visual-editor';
          $vw_hosting_services_plugin_file = 'ibtana-visual-editor/plugin.php';

          // Check if plugin is installed
          $vw_hosting_services_installed_plugins = get_plugins();
          if (!isset($vw_hosting_services_installed_plugins[$vw_hosting_services_plugin_file])) {
              include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
              include_once(ABSPATH . 'wp-admin/includes/file.php');
              include_once(ABSPATH . 'wp-admin/includes/misc.php');
              include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

              // Install the plugin
              $vw_hosting_services_upgrader = new Plugin_Upgrader();
              $vw_hosting_services_upgrader->install('https://downloads.wordpress.org/plugin/ibtana-visual-editor.latest-stable.zip');
          }
          // Activate the plugin
          activate_plugin($vw_hosting_services_plugin_file);
        }


        // ------- Create Nav Menu --------
            $vw_hosting_services_menuname = 'Main Menus';
            $vw_hosting_services_bpmenulocation = 'primary';
            $vw_hosting_services_menu_exists = wp_get_nav_menu_object($vw_hosting_services_menuname);

            if (!$vw_hosting_services_menu_exists) {
                $vw_hosting_services_menu_id = wp_create_nav_menu($vw_hosting_services_menuname);

                // Create Home Page
                $vw_hosting_services_home_title = 'Home';
                $vw_hosting_services_home = array(
                    'post_type' => 'page',
                    'post_title' => $vw_hosting_services_home_title,
                    'post_content' => '',
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_slug' => 'home'
                );
                $vw_hosting_services_home_id = wp_insert_post($vw_hosting_services_home);
                // Assign Home Page Template
                add_post_meta($vw_hosting_services_home_id, '_wp_page_template', 'page-template/custom-home-page.php');
                // Update options to set Home Page as the front page
                update_option('page_on_front', $vw_hosting_services_home_id);
                update_option('show_on_front', 'page');
                // Add Home Page to Menu
                wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title' => __('Home', 'vw-hosting-services'),
                    'menu-item-classes' => 'home',
                    'menu-item-url' => home_url('/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $vw_hosting_services_home_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Create Hosting Page with Dummy Content
                $vw_hosting_services_pages_title = 'Hosting';
                $vw_hosting_services_pages_content = '
                Explore all the pages we have on our website. Find information about our services, company, and more.
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960 with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br>
                All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.';
                $vw_hosting_services_pages = array(
                    'post_type' => 'page',
                    'post_title' => $vw_hosting_services_pages_title,
                    'post_content' => $vw_hosting_services_pages_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_slug' => 'pages'
                );
                $vw_hosting_services_pages_id = wp_insert_post($vw_hosting_services_pages);
                // Add Hosting Page to Menu
                wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title' => __('Hosting', 'vw-hosting-services'),
                    'menu-item-classes' => 'pages',
                    'menu-item-url' => home_url('/pages/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $vw_hosting_services_pages_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Create Domain Page with Dummy Content
                $vw_hosting_services_about_title = 'Domain';
                $vw_hosting_services_about_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...<br>
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960 with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br>
                There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anything embarrassing hidden in the middle of text.<br>
                All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.';
                $vw_hosting_services_about = array(
                    'post_type' => 'page',
                    'post_title' => $vw_hosting_services_about_title,
                    'post_content' => $vw_hosting_services_about_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_slug' => 'about-us'
                );
                $vw_hosting_services_about_id = wp_insert_post($vw_hosting_services_about);
                // Add Domain Page to Menu
                wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title' => __('Domain', 'vw-hosting-services'),
                    'menu-item-classes' => 'about-us',
                    'menu-item-url' => home_url('/about-us/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $vw_hosting_services_about_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Create About Page with Dummy Content
                $vw_hosting_services_about_title = 'About';
                $vw_hosting_services_about_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...<br>
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960 with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br>
                There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anything embarrassing hidden in the middle of text.<br>
                All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.';
                $vw_hosting_services_about = array(
                    'post_type' => 'page',
                    'post_title' => $vw_hosting_services_about_title,
                    'post_content' => $vw_hosting_services_about_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_slug' => 'about-us'
                );
                $vw_hosting_services_about_id = wp_insert_post($vw_hosting_services_about);
                // Add About Page to Menu
                wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title' => __('About', 'vw-hosting-services'),
                    'menu-item-classes' => 'about-us',
                    'menu-item-url' => home_url('/about-us/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $vw_hosting_services_about_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Create Blog Page 
                $vw_hosting_services_blog_page_title = 'Blog';
                $vw_hosting_services_blog_page_query = new WP_Query(array(
                    'post_type'      => 'page',
                    'name'           => sanitize_title($vw_hosting_services_blog_page_title),
                    'post_status'    => 'publish',
                    'posts_per_page' => 1
                ));
                if (!$vw_hosting_services_blog_page_query->have_posts()) {
                    $vw_hosting_services_blog_page = array(
                    'post_type'   => 'page',
                    'post_title'  => $vw_hosting_services_blog_page_title,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    );
                    $vw_hosting_services_blog_page_id = wp_insert_post($vw_hosting_services_blog_page);
                    update_option('page_for_posts', $vw_hosting_services_blog_page_id);
                    wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title'      => __('Blog', 'vw-hosting-services'),
                    'menu-item-url'        => get_permalink($vw_hosting_services_blog_page_id),
                    'menu-item-status'     => 'publish',
                    'menu-item-object-id'  => $vw_hosting_services_blog_page_id,
                    'menu-item-object'     => 'page',
                    'menu-item-type'       => 'post_type',
                    ));
                }

                // Create Support Page with Dummy Content
                $vw_hosting_services_about_title = 'Support';
                $vw_hosting_services_about_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...<br>
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960 with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br>
                There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anything embarrassing hidden in the middle of text.<br>
                All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.';
                $vw_hosting_services_about = array(
                    'post_type' => 'page',
                    'post_title' => $vw_hosting_services_about_title,
                    'post_content' => $vw_hosting_services_about_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_slug' => 'about-us'
                );
                $vw_hosting_services_about_id = wp_insert_post($vw_hosting_services_about);
                // Add Support Page to Menu
                wp_update_nav_menu_item($vw_hosting_services_menu_id, 0, array(
                    'menu-item-title' => __('Support', 'vw-hosting-services'),
                    'menu-item-classes' => 'about-us',
                    'menu-item-url' => home_url('/about-us/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $vw_hosting_services_about_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Set the menu location if it's not already set
                if (!has_nav_menu($vw_hosting_services_bpmenulocation)) {
                    $vw_hosting_services_locations = get_theme_mod('nav_menu_locations'); // Use 'nav_menu_locations' to get locations array
                    if (empty($vw_hosting_services_locations)) {
                        $vw_hosting_services_locations = array();
                    }
                    $vw_hosting_services_locations[$vw_hosting_services_bpmenulocation] = $vw_hosting_services_menu_id;
                    set_theme_mod('nav_menu_locations', $vw_hosting_services_locations);
                }

        }

        // Set the demo import completion flag
        update_option('vw_hosting_services_demo_import_completed', true);

        // Display success message and "View Site" button
        echo '<p class="notice-text">' . esc_html__('Your demo import has been completed successfully.', 'vw-hosting-services') . '</p>';
        echo '<span><a href="' . esc_url(home_url()) . '" class="button button-primary site-btn" target="_blank">' . esc_html__('View Site', 'vw-hosting-services') . '</a></span>';
        echo '<span><a href="'. esc_url(admin_url('customize.php') ) .'" class="button button-primary demo-btn" target=_blank>'. esc_html__( 'Customize Your Site', 'vw-hosting-services' ) .'</a></span>';
        echo '<span><a href="'. esc_url( 'https://preview.vwthemesdemo.com/docs/free-vw-hosting-services/' ) .'" class="button button-primary doc-btn" target=_blank>'. esc_html__( 'Free Theme Documentation', 'vw-hosting-services' ) .'</a></span>';
        //end

        // Top Bar start //
        set_theme_mod( 'vw_hosting_services_offer_text', '"Unbelievable Deal: Get 70% OFF on Select Items - Limited Time Offer!"' ); 

        // slider section start //  
        set_theme_mod('vw_hosting_services_slider_hide_show',true);
        set_theme_mod( 'vw_hosting_services_banner_image', get_template_directory_uri().'/assets/images/slider.png');
        set_theme_mod( 'vw_hosting_services_slider_small_title', 'MEET HOSTING' );
        set_theme_mod( 'vw_hosting_services_banner_tagline_title', 'Security, reliability and speed every where' );
        set_theme_mod( 'vw_hosting_services_banner_para_text', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s' );
        set_theme_mod( 'vw_hosting_services_slider_button_text', 'READ MORE' );
        set_theme_mod( 'vw_hosting_services_top_button_url', '#' );


        set_theme_mod( 'vw_hosting_services_product_clock_timer_end', 'November 30 2025 11:00:00' );
        set_theme_mod( 'vw_hosting_services_product_button_text', 'Claim Deal' );
        set_theme_mod( 'vw_hosting_services_time_btn_link', '#' );

        set_theme_mod('vw_hosting_services_product_time_category', 'Category1');

        $vw_hosting_services_category_names = array('Category1', 'Category2');
        $vw_hosting_services_title_array = array(
            array("Product1", "Product2"),
            array("Product3", "Product4")
        );

        foreach ($vw_hosting_services_category_names as $vw_hosting_services_index => $vw_hosting_services_category_name) {
            // Create or get product category
            $term = term_exists($vw_hosting_services_category_name, 'product_cat');
            if (!$term) {
                $term = wp_insert_term($vw_hosting_services_category_name, 'product_cat');
            }

            if (is_wp_error($term)) {
                error_log('Error creating category: ' . $term->get_error_message());
                continue;
            }

            for ($i = 0; $i < count($vw_hosting_services_title_array[$vw_hosting_services_index]); $i++) {
                $title = $vw_hosting_services_title_array[$vw_hosting_services_index][$i];

                // Create the product
                $post_id = wp_insert_post(array(
                    'post_title'   => wp_strip_all_tags($title),
                    'post_status'  => 'publish',
                    'post_type'    => 'product',
                ));

                if (is_wp_error($post_id)) {
                    error_log('Error creating product: ' . $post_id->get_error_message());
                    continue;
                }

                // Set as subscription product (YITH-specific)
                wp_set_object_terms($post_id, 'subscription', 'product_type');

                // Assign to category
                wp_set_object_terms($post_id, (int)$term['term_id'], 'product_cat');

                // Set meta for YITH subscription
                update_post_meta($post_id, '_ywsbs_price_is_per', '3');
                update_post_meta($post_id, '_ywsbs_price_time_option', 'months');

                update_post_meta($post_id, '_regular_price', '3');
                update_post_meta($post_id, '_price', '3');
                update_post_meta($post_id, '_ywsbs_subscription', 'yes'); // Enable subscription               
            }
        }



        set_theme_mod('vw_hosting_services_services_number', '5');

            $vw_hosting_services_tab_text_array = array("Web Hosting", "VPS Hosting", "Cloud Hosting", "Wordpress Hosting", "Business Mail");
            $vw_hosting_services_category_names = array("postcategory1", "postcategory2", "postcategory3", "postcategory4", "postcategory5");
            $vw_hosting_services_title_array = array(
                array("Single", "Premium","Business"),
                array("Premium","Business","Single"),
                array("Single", "Premium","Business"),
                array("Premium","Business","Single"),
                array("Single", "Premium","Business")
                
            );

            $vw_hosting_services_feature_array = array(
                array('1 Website','Standard Performance','40 GB SSD Storage','Weekly Backup'),
                array('100 Website','Standard Performance','100 GB SSD Storage','Weekly backup'),
                array('150 website','Standard Performance','180 GB SSD Storage','Weekly backup')
            );

            $vw_hosting_services_features = array(
                array(
                    'hasfeature' => true,
                    'text'       => '1 website',
                    'infotext'   => '',
                ),
                array(
                    'hasfeature' => true,
                    'text'       => 'Standard performance',
                    'infotext'   => '',
                ),
                array(
                    'hasfeature' => true,
                    'text'       => '40GB SSD storage',
                    'infotext'   => '',
                ),
                array(
                    'hasfeature' => true,
                    'text'       => 'Weekly backup',
                    'infotext'   => '',
                ),
            );

            for ($vw_hosting_services_tab_index = 1; $vw_hosting_services_tab_index <= 5; $vw_hosting_services_tab_index++) {
                $theme_mod_key = 'vw_hosting_services_services_text' . $vw_hosting_services_tab_index;
                $theme_mod_value = $vw_hosting_services_tab_text_array[$vw_hosting_services_tab_index - 1];
                set_theme_mod($theme_mod_key, $theme_mod_value);

                // Set the category for this tab
                $current_category = $vw_hosting_services_category_names[$vw_hosting_services_tab_index - 1];
                set_theme_mod('vw_hosting_services_product_settings' . $vw_hosting_services_tab_index, $current_category);

                // Create or retrieve the product category term ID
                $vw_hosting_services_term = term_exists($current_category, 'product_cat');
                if ($vw_hosting_services_term === 0 || $vw_hosting_services_term === null) {
                    // If the term does not exist, create it
                    $vw_hosting_services_term = wp_insert_term($current_category, 'product_cat');
                }
                if (is_wp_error($vw_hosting_services_term)) {
                    error_log('Error creating category: ' . $vw_hosting_services_term->get_error_message());
                    continue; // Skip to the next iteration if category creation fails
                }

                for ($vw_hosting_services_i = 0; $vw_hosting_services_i < 3; $vw_hosting_services_i++) {
                    // Create product content
                    $vw_hosting_services_title = $vw_hosting_services_title_array[$vw_hosting_services_tab_index - 1][$vw_hosting_services_i];
                    $vw_hosting_services_content = 'A great solution for beginners';

                    // Create WooCommerce product post object
                    $vw_hosting_services_my_post = array(
                        'post_title'    => wp_strip_all_tags($vw_hosting_services_title),
                        'post_content'  => $vw_hosting_services_content,
                        'post_status'   => 'publish',
                        'post_type'     => 'product', // Post type set to 'product' for WooCommerce
                    );

                    // Insert the product into the database
                    $vw_hosting_services_post_id = wp_insert_post($vw_hosting_services_my_post);

                    if (is_wp_error($vw_hosting_services_post_id)) {
                        error_log('Error creating product: ' . $vw_hosting_services_post_id->get_error_message());
                        continue; // Skip to the next product if creation fails
                    }

                   // Assign the category to the product
                    wp_set_object_terms($vw_hosting_services_post_id, (int)$vw_hosting_services_term['term_id'], 'product_cat');

                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_per_month_text', "$ 03.00/mo");
                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_technology', "+3 month free");
                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_save_text', "save 70%");
                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_renew_text', "$04.00/mo when you renew");
                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_button_text', "See All Features");
                    
                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_top_features', $vw_hosting_services_feature_array);
                    // update_post_meta($vw_hosting_services_post_id, 'features[0][hasfeature]', 'yes'); 
                    // update_post_meta($vw_hosting_services_post_id, 'features[0][text]', "1 website");
                    // update_post_meta($vw_hosting_services_post_id, 'features[1][text]', "Standard performance");
                    // update_post_meta($vw_hosting_services_post_id, 'features[2][text]', "40GB SSD storage");
                    // update_post_meta($vw_hosting_services_post_id, 'features[3][text]', "Weekly backup");

                    update_post_meta($vw_hosting_services_post_id, 'vw_hosting_services_top_features', $vw_hosting_services_features);
                }
            }    
            
                 

          //Copyright Text
          set_theme_mod( 'vw_hosting_services_footer_text', 'By VWThemes' );             
    }
  ?>

    <form action="<?php echo esc_url(home_url()); ?>/wp-admin/themes.php?page=vw_hosting_services_guide" method="POST" onsubmit="return validate(this);">
        <?php if (!get_option('vw_hosting_services_demo_import_completed')) : ?>
            <form method="post">   
                <p class="run-import-text"><?php esc_html_e('Click On The Below Run Importer Button To Import Demo Content Of vw hosting services', 'vw-hosting-services'); ?></p>
                <p><?php esc_html_e('Please back up your website if it’s already live with data. This importer will overwrite your existing settings with the new customizer values for vw hosting services', 'vw-hosting-services'); ?></p>
                <input class="run-import" type="submit" name="submit" value="<?php esc_attr_e('Run Importer', 'vw-hosting-services'); ?>" class="button button-primary button-large">
          </form>
        <?php endif; ?>
        <div id="spinner" style="display:none;">         
            <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/spinner.png" alt="" />
        </div>
    </form>
    <script type="text/javascript">
        function validate(form) {
            if (confirm("Do you really want to import the theme demo content?")) {
                document.getElementById('spinner').style.display = 'block';
                return true;
            } 
            else {
                return false;
            }
        }
    </script>
</div>

