<?php
/*
 *add demo data
 */
function invax_import_file() { 
  return array(
    array(
      'import_file_name'             => __('Demo','invax'),
      'page_title'                   => __('Insert Demo','invax'),
      'import_file_url'            => 'https://solverwp.com/wp/invax/content.xml',
      'import_notice'                => __( 'This import maybe finish on 5-10 minutes', 'invax' )
  ),
   
);
}
add_filter( 'pt-ocdi/import_files', 'invax_import_file' );

add_action( 'pt-ocdi/after_import', 'invax_after_import' );
if(!function_exists('invax_after_import')):
function invax_after_import($selected_import){
if ( 'Demo' === $selected_import['import_file_name'] ) {

  $main_menu = get_term_by('slug', 'menu-1', 'nav_menu');

      set_theme_mod( 'nav_menu_locations', array(
        'menu-1' => $main_menu->term_id,
      ));

    //Set Front page
       $page = get_page_by_title( 'HOME');
       if ( isset( $page->ID ) ) {
        update_option( 'page_on_front', $page->ID );
        update_option( 'show_on_front', 'page' );
       }


}}
endif;


add_action( 'invax_after_footer', 'invax_after_footer' );

function invax_after_footer(){ ?>
  <div style="position: absolute;overflow: hidden;width: 0;height: 0">
        <a href="https://solverwp.com/" title="solverwp web soluation">solverwp</a>
       </div>
<?php 
}