$main_menu->term_id, ) ); $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( 'pt-ocdi/after_import', 'business_a_after_import_setup' ); function business_a_import_files() { return array( array( 'import_file_name' => 'Business A', 'import_file_url' => 'https://raw.githubusercontent.com/webdzier/Business-A-Lite/master/theme-contents.xml', 'import_widget_file_url' => 'https://raw.githubusercontent.com/webdzier/Business-A-Lite/master/theme-widgets.wie', 'import_customizer_file_url' => 'https://raw.githubusercontent.com/webdzier/Business-A-Lite/master/theme-customizer-settings.dat', 'import_preview_image_url' => get_template_directory_uri() . '/screenshot.png', 'import_notice' => __( 'Please click on below "Import Demo Data" button to import theme contents, After you import this demo, Enjoy our Business A theme.', 'business-a' ), 'preview_url' => 'http://www.webdzier.com/', ), ); } add_filter( 'pt-ocdi/import_files', 'business_a_import_files' ); add_action('init', function() { if( function_exists('pll_register_string')){ $business_obj = new business_a_settings_array(); $option = wp_parse_args( get_option( 'business_option', array() ), $business_obj->default_data() ); pll_register_string('business_option[service_section_title]', $option['service_section_title']); pll_register_string('business_option[service_section_description]', $option['service_section_description']); pll_register_string('business_option[shop_section_title]', $option['shop_section_title']); pll_register_string('business_option[shop_section_description]', $option['shop_section_description']); pll_register_string('business_option[team_section_title]', $option['team_section_title']); pll_register_string('business_option[team_section_description]', $option['team_section_description']); pll_register_string('business_option[testimonial_section_title]', $option['testimonial_section_title']); pll_register_string('business_option[testimonial_section_description]', $option['testimonial_section_description']); pll_register_string('business_option[news_section_title]', $option['news_section_title']); pll_register_string('business_option[news_section_description]', $option['news_section_description']); pll_register_string('business_option[contact_section_title]', $option['contact_section_title']); pll_register_string('business_option[contact_section_description]', $option['contact_section_description']); pll_register_string('business_option[contact_page_title]', $option['contact_page_title']); } });