← All changes
|
app/modules/import-export-customization/processes/import.php
+0
-16
4.3.0-beta3
→
4.2.1
View file →
| @@ -8,10 +8,8 @@ | ||
| 8 | 8 | use Elementor\App\Modules\ImportExportCustomization\Compatibility\Customization; |
| 9 | 9 | use Elementor\App\Modules\ImportExportCustomization\Utils; |
| 10 | 10 | use Elementor\Core\Base\Document; |
| 11 | 11 | use Elementor\Core\Kits\Documents\Kit; |
| 12 | -use Elementor\Modules\AtomicWidgets\Utils\Atomic_Prop_Remap; | |
| 13 | -use Elementor\Modules\Components\Module as Components_Module; | |
| 14 | 12 | use Elementor\Plugin; |
| 15 | 13 | |
| 16 | 14 | use Elementor\App\Modules\ImportExportCustomization\Runners\Import\Elementor_Content; |
| 17 | 15 | use Elementor\App\Modules\ImportExportCustomization\Runners\Import\Import_Runner_Base; |
| @@ -785,11 +783,8 @@ | ||
| 785 | 783 | foreach ( $this->documents_data as $new_id => $data ) { |
| 786 | 784 | $document = Plugin::$instance->documents->get( $new_id ); |
| 787 | 785 | |
| 788 | 786 | if ( isset( $data['elements'] ) ) { |
| 789 | - $data['elements'] = Components_Module::prepare_imported_elements( $data['elements'], $imported_data_replacements['post_ids'] ?? [] ); | |
| 790 | - $data['elements'] = Atomic_Prop_Remap::apply( $data['elements'], $imported_data_replacements ); | |
| 791 | - $this->merge_atomic_prop_remap_warnings( Atomic_Prop_Remap::consume_warnings() ); | |
| 792 | 787 | $data['elements'] = $document->on_import_update_dynamic_content( $data['elements'], $imported_data_replacements ); |
| 793 | 788 | } |
| 794 | 789 | |
| 795 | 790 | if ( isset( $data['settings'] ) ) { |
| @@ -803,19 +798,8 @@ | ||
| 803 | 798 | } |
| 804 | 799 | |
| 805 | 800 | $document->save( $data ); |
| 806 | 801 | } |
| 807 | - } | |
| 808 | - | |
| 809 | - private function merge_atomic_prop_remap_warnings( array $warnings ): void { | |
| 810 | - if ( empty( $warnings ) ) { | |
| 811 | - return; | |
| 812 | - } | |
| 813 | - | |
| 814 | - $existing = $this->runners_import_metadata['atomic_prop_remap']['warnings'] ?? []; | |
| 815 | - $this->runners_import_metadata['atomic_prop_remap'] = [ | |
| 816 | - 'warnings' => array_merge( $existing, $warnings ), | |
| 817 | - ]; | |
| 818 | 802 | } |
| 819 | 803 | |
| 820 | 804 | private function update_instance_data_in_import_session_option() { |
| 821 | 805 | $import_sessions = Utils::get_import_sessions(); |