← All changes
|
app/modules/import-export/processes/import.php
+5
-9
4.0.8
→
3.32.0-dev3
View file →
| @@ -138,14 +138,13 @@ | ||
| 138 | 138 | */ |
| 139 | 139 | private $runners_import_metadata = []; |
| 140 | 140 | |
| 141 | 141 | /** |
| 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.) | |
| 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.) | |
| 145 | 145 | * @param array|null $old_instance An array of old instance parameters that will be used for creating new instance. |
| 146 | - * We are using it for quick creation of the instance when the import process is being split into chunks. | |
| 147 | - * | |
| 146 | + * We are using it for quick creation of the instance when the import process is being split into chunks. | |
| 148 | 147 | * @throws \Exception If the import session does not exist. |
| 149 | 148 | */ |
| 150 | 149 | public function __construct( string $path, array $settings = [], array $old_instance = null ) { |
| 151 | 150 | if ( ! empty( $old_instance ) ) { |
| @@ -559,9 +558,9 @@ | ||
| 559 | 558 | |
| 560 | 559 | /** |
| 561 | 560 | * Prevent saving elements on elementor post creation. |
| 562 | 561 | * |
| 563 | - * @param array $data | |
| 562 | + * @param array $data | |
| 564 | 563 | * @param Document $document |
| 565 | 564 | * |
| 566 | 565 | * @return array |
| 567 | 566 | */ |
| @@ -584,9 +583,8 @@ | ||
| 584 | 583 | * Extract the zip file. |
| 585 | 584 | * |
| 586 | 585 | * @param string $zip_path The path to the zip file. |
| 587 | 586 | * @return string The extracted directory path. |
| 588 | - * @throws \Error If import process fails, file validation errors occur, or data corruption is detected. | |
| 589 | 587 | */ |
| 590 | 588 | private function extract_zip( $zip_path ) { |
| 591 | 589 | $extraction_result = Plugin::$instance->uploads_manager->extract_and_validate_zip( $zip_path, [ 'json', 'xml' ] ); |
| 592 | 590 | |
| @@ -604,10 +602,8 @@ | ||
| 604 | 602 | /** |
| 605 | 603 | * Get the manifest file from the extracted directory and adapt it if needed. |
| 606 | 604 | * |
| 607 | 605 | * @return string The manifest file content. |
| 608 | - * | |
| 609 | - * @throws \Error If import validation fails or processing errors occur. | |
| 610 | 606 | */ |
| 611 | 607 | private function read_manifest_json() { |
| 612 | 608 | $manifest = Utils::read_json_file( $this->extracted_directory_path . 'manifest' ); |
| 613 | 609 | |