true ), new ProteusThemes\WPContentImporter2\WPImporterLogger() ); $importer->restore_import_data_transient(); $importer_mapping = $importer->get_mapping(); $term_ids = empty( $importer_mapping['term_id'] ) ? array() : $importer_mapping['term_id']; // Set the new menu ID for the widget. $widget['nav_menu'] = empty( $term_ids[ $widget['nav_menu'] ] ) ? $widget['nav_menu'] : $term_ids[ $widget['nav_menu'] ]; return $widget; } /** * Wrapper function for the after all import action hook. * * @param int $selected_import_index The selected demo import index. */ public function after_all_import_action( $selected_import_index ) { do_action( 'merlin_after_all_import', $selected_import_index ); return true; } /** * Maybe disables generation of multiple image sizes (thumbnails) in the content import step. */ public function maybe_disable_creating_different_size_images_during_import() { if ( ! apply_filters( 'merlin_regenerate_thumbnails_in_content_import', true ) ) { add_filter( 'intermediate_image_sizes_advanced', '__return_null' ); } } }