| Server IP : 172.64.80.1 / Your IP : 216.73.216.175 Web Server : LiteSpeed System : Linux srv13.swhc.ca 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : hongluck ( 2522) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/hongluck/public_html/wp-content/themes/integral/inc/ |
Upload File : |
<?php
/**
* Theme Demo Import plugin specific functions.
*/
/**
* Adds support for the pre-defined demo content.
*/
function TDI_import_files() {
return array(
array(
'import_file_name' => 'Integral Demo Content',
'local_import_file' => trailingslashit( get_template_directory() ) . 'inc/demo/integral-demo-content.xml',
'local_import_widget_file' => trailingslashit( get_template_directory() ) . 'inc/demo/integral-demo-widgets.wie',
'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/demo/integral-demo-customizer.dat',
),
);
}
add_filter( 'theme-demo-import/import_files', 'TDI_import_files' );
/**
* Adds support for setting the default front and blog pages as well as assigning the default menu.
*/
function TDI_after_import_setup() {
// Assign menus to their locations.
$main_menu = get_term_by( 'name', 'Top Menu', 'nav_menu' );
set_theme_mod( 'nav_menu_locations', array(
'primary' => $main_menu->term_id,
)
);
// Assign front page and posts page (blog page).
$front_page_id = get_page_by_title( 'Home' );
$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 );
}
add_action( 'theme-demo-import/after_import', 'TDI_after_import_setup' );