← All changes
|
app/modules/import-export/processes/import.php
+0
-16
4.3.0-beta3
→
4.0.9
View file →
| @@ -7,10 +7,8 @@ | ||
| 7 | 7 | use Elementor\App\Modules\ImportExport\Compatibility\Kit_Library; |
| 8 | 8 | use Elementor\App\Modules\ImportExport\Utils; |
| 9 | 9 | use Elementor\Core\Base\Document; |
| 10 | 10 | use Elementor\Core\Kits\Documents\Kit; |
| 11 | -use Elementor\Modules\AtomicWidgets\Utils\Atomic_Prop_Remap; | |
| 12 | -use Elementor\Modules\Components\Module as Components_Module; | |
| 13 | 11 | use Elementor\Plugin; |
| 14 | 12 | |
| 15 | 13 | use Elementor\App\Modules\ImportExport\Runners\Import\Elementor_Content; |
| 16 | 14 | use Elementor\App\Modules\ImportExport\Runners\Import\Import_Runner_Base; |
| @@ -741,11 +739,8 @@ | ||
| 741 | 739 | foreach ( $this->documents_data as $new_id => $data ) { |
| 742 | 740 | $document = Plugin::$instance->documents->get( $new_id ); |
| 743 | 741 | |
| 744 | 742 | if ( isset( $data['elements'] ) ) { |
| 745 | - $data['elements'] = Components_Module::prepare_imported_elements( $data['elements'], $imported_data_replacements['post_ids'] ?? [] ); | |
| 746 | - $data['elements'] = Atomic_Prop_Remap::apply( $data['elements'], $imported_data_replacements ); | |
| 747 | - $this->merge_atomic_prop_remap_warnings( Atomic_Prop_Remap::consume_warnings() ); | |
| 748 | 743 | $data['elements'] = $document->on_import_update_dynamic_content( $data['elements'], $imported_data_replacements ); |
| 749 | 744 | } |
| 750 | 745 | |
| 751 | 746 | if ( isset( $data['settings'] ) ) { |
| @@ -759,19 +754,8 @@ | ||
| 759 | 754 | } |
| 760 | 755 | |
| 761 | 756 | $document->save( $data ); |
| 762 | 757 | } |
| 763 | - } | |
| 764 | - | |
| 765 | - private function merge_atomic_prop_remap_warnings( array $warnings ): void { | |
| 766 | - if ( empty( $warnings ) ) { | |
| 767 | - return; | |
| 768 | - } | |
| 769 | - | |
| 770 | - $existing = $this->runners_import_metadata['atomic_prop_remap']['warnings'] ?? []; | |
| 771 | - $this->runners_import_metadata['atomic_prop_remap'] = [ | |
| 772 | - 'warnings' => array_merge( $existing, $warnings ), | |
| 773 | - ]; | |
| 774 | 758 | } |
| 775 | 759 | |
| 776 | 760 | private function update_instance_data_in_import_session_option() { |
| 777 | 761 | $import_sessions = Utils::get_import_sessions(); |