PluginProbe
Elementor Website Builder – more than just a page builder / 3.32.2
Elementor Website Builder – more than just a page builder v3.32.2
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | app/modules/import-export/processes/import.php +5 -11 4.3.0-beta23.32.2 View file →
@@ -7,9 +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\Components\Module as Components_Module;
12 11 use Elementor\Plugin;
13 12
14 13 use Elementor\App\Modules\ImportExport\Runners\Import\Elementor_Content;
15 14 use Elementor\App\Modules\ImportExport\Runners\Import\Import_Runner_Base;
@@ -139,14 +138,13 @@
139 138 */
140 139 private $runners_import_metadata = [];
141 140
142 141 /**
143 - * @param string $path session_id | zip_file_path
144 - * @param array $settings Use to determine which content to import.
145 - * (e.g: include, selected_plugins, selected_cpt, selected_override_conditions, etc.)
142 + * @param string $path session_id | zip_file_path
143 + * @param array $settings Use to determine which content to import.
144 + * (e.g: include, selected_plugins, selected_cpt, selected_override_conditions, etc.)
146 145 * @param array|null $old_instance An array of old instance parameters that will be used for creating new instance.
147 - * We are using it for quick creation of the instance when the import process is being split into chunks.
148 - *
146 + * We are using it for quick creation of the instance when the import process is being split into chunks.
149 147 * @throws \Exception If the import session does not exist.
150 148 */
151 149 public function __construct( string $path, array $settings = [], array $old_instance = null ) {
152 150 if ( ! empty( $old_instance ) ) {
@@ -560,9 +558,9 @@
560 558
561 559 /**
562 560 * Prevent saving elements on elementor post creation.
563 561 *
564 - * @param array $data
562 + * @param array $data
565 563 * @param Document $document
566 564 *
567 565 * @return array
568 566 */
@@ -585,9 +583,8 @@
585 583 * Extract the zip file.
586 584 *
587 585 * @param string $zip_path The path to the zip file.
588 586 * @return string The extracted directory path.
589 - * @throws \Error If import process fails, file validation errors occur, or data corruption is detected.
590 587 */
591 588 private function extract_zip( $zip_path ) {
592 589 $extraction_result = Plugin::$instance->uploads_manager->extract_and_validate_zip( $zip_path, [ 'json', 'xml' ] );
593 590
@@ -605,10 +602,8 @@
605 602 /**
606 603 * Get the manifest file from the extracted directory and adapt it if needed.
607 604 *
608 605 * @return string The manifest file content.
609 - *
610 - * @throws \Error If import validation fails or processing errors occur.
611 606 */
612 607 private function read_manifest_json() {
613 608 $manifest = Utils::read_json_file( $this->extracted_directory_path . 'manifest' );
614 609
@@ -740,9 +735,8 @@
740 735 foreach ( $this->documents_data as $new_id => $data ) {
741 736 $document = Plugin::$instance->documents->get( $new_id );
742 737
743 738 if ( isset( $data['elements'] ) ) {
744 - $data['elements'] = Components_Module::prepare_imported_elements( $data['elements'], $imported_data_replacements['post_ids'] ?? [] );
745 739 $data['elements'] = $document->on_import_update_dynamic_content( $data['elements'], $imported_data_replacements );
746 740 }
747 741
748 742 if ( isset( $data['settings'] ) ) {