HEX
Server: Apache
System: Linux server7 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64
User: k8148-2 (1324)
PHP: 8.2.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen, system, shell_exec, passthru, popen, proc_open, exec
Upload Files
File: /var/www/k8148-2/htdocs/www.sport-roth.at/wp-content/themes/old_daniel/inc/demo-import.php
<?php

add_action( 'admin_head', 'httheme_remove_ocdi_notice' );
function httheme_remove_ocdi_notice(){
  ?>
  <style type="text/css">
    .ocdi .notice-info{
      display: none !important;
    }
  </style>
  <?php
}

function daniel_import_files() {
  return array(
    array(
      'import_file_name'           => __( 'Standard Demo', 'daniel' ),
      'local_import_file'            => get_stylesheet_directory() . '/inc/demo-content/all_content.xml',
      'local_import_widget_file'     => get_stylesheet_directory() . '/inc/demo-content/widgets.wie',
      'local_import_customizer_file' => get_stylesheet_directory() . '/inc/demo-content/daniel-export.dat',
      'import_preview_image_url'     => get_template_directory_uri() .'/screenshot.png',
      'import_notice'                => __( 'After you import this demo, you will have setup all content.', 'daniel' ),
    ),
    array(
      'import_file_name'             => __( 'CommingSoon','daniel'),
      'local_import_file'            => get_stylesheet_directory() . '/inc/demo-content/all_content.xml',
      'import_widget_file_url'       => get_stylesheet_directory() . '/inc/demo-content/widgets.wie',
      'local_import_customizer_file' => get_stylesheet_directory() . '/inc/demo-content/daniel-export.dat',
    ),
    'import_preview_image_url'     => get_template_directory_uri() .'/screenshot.png',
  ); 
}
add_filter( 'pt-ocdi/import_files', 'daniel_import_files' );

////////////////////////////////////////////////////////////////////
function daniel_after_import_setup() {

    // Assign menus to their locations.
    $header_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );
    $footer_menu = get_term_by( 'name', 'Footer Menu', 'nav_menu' );
      set_theme_mod( 'nav_menu_locations' , array( 
        'mainmenu' => $header_menu->term_id,
        'footermenu' => $footer_menu->term_id,
      ) 
    );

	// Assign front page and posts page (blog page).
	// set front page
	$front_page_id = get_page_by_title( 'Home Version 1' );
	update_option( 'show_on_front', 'page' );
	update_option( 'page_on_front', $front_page_id->ID );

	// set blog page
	$blog_page_id  = get_page_by_title( 'Blog Standard' );
	update_option( 'page_for_posts', $blog_page_id->ID );

	// set shop page
	$shop_page_id = get_page_by_title('shop');
	$shop_page_id = $shop_page_id ? $shop_page_id->ID : get_option( 'woocommerce_shop_page_id');
	update_option( 'woocommerce_shop_page_id', $shop_page_id);

	// set cart page
	$cart_page_id = get_page_by_title('cart');
	$cart_page_id = $cart_page_id ? $cart_page_id->ID : get_option( 'woocommerce_cart_page_id');
	update_option( 'woocommerce_cart_page_id', $cart_page_id);

	// set chekcout page
	$checkout_page_id = get_page_by_title('checkout');
	$checkout_page_id = $checkout_page_id ? $checkout_page_id->ID : get_option( 'woocommerce_checkout_page_id');
	update_option( 'woocommerce_checkout_page_id', $checkout_page_id);

	// set myaccount page
	$account_page_id = get_page_by_title('my account ');
	$account_page_id = $account_page_id ? $account_page_id->ID : get_option( 'woocommerce_myaccount_page_id');
	update_option( 'woocommerce_myaccount_page_id', $account_page_id);

	// set wishlist page
	$wishlist_page_id = get_page_by_title('wishlist');
	$wishlist_page_id = $wishlist_page_id ? $wishlist_page_id->ID : get_option( 'yith_wcwl_wishlist_page_id');
	update_option( 'yith_wcwl_wishlist_page_id', $wishlist_page_id);

	// disable elementor color
	update_option('elementor_disable_color_schemes', 'yes');

	// disable elementor font
	update_option('elementor_disable_typography_schemes', 'yes');

	// set content width
	update_option('elementor_container_width', '1170');

	// set widget space
	update_option('elementor_space_between_widgets', '30');

	// disable lightbox
	update_option('elementor_global_image_lightbox', '');

	flush_rewrite_rules();
}
add_action( 'pt-ocdi/after_import', 'daniel_after_import_setup' );