PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.4
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.4
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Core/Importer/WPImport.php +6 -21 3.6.43.4.4 View file →
@@ -87,18 +87,8 @@
87 87 * WXR attachment ID
88 88 */
89 89 private $id;
90 90
91 - /**
92 - * @var mixed
93 - */
94 - private $json;
95 -
96 - /**
97 - * @var string
98 - */
99 - private $session_id;
100 -
101 91 // Information to import from WXR file.
102 92 private $version;
103 93 private $authors = [];
104 94 public $posts = [];
@@ -395,9 +385,9 @@
395 385 return;
396 386 }
397 387
398 388
399 - $processed_templates = $this->get_loop_result([], $this->import_data_key);
389 + $processed_templates = $this->get_progress([], $this->import_data_key);
400 390 if (!empty($processed_templates)) {
401 391 return;
402 392 }
403 393
@@ -457,9 +447,9 @@
457 447 $this->author_mapping[ $santized_old_login ] = (int) get_current_user_id();
458 448 }
459 449 }
460 450
461 - $this->set_loop_result( true, $this->import_data_key );
451 + $this->update_progress( true, null, $this->import_data_key );
462 452 }
463 453
464 454 /**
465 455 * Create new terms based on import information
@@ -473,11 +463,11 @@
473 463 'succeed' => [],
474 464 'failed' => [],
475 465 ];
476 466
477 - $processed_templates = $this->get_loop_result([], "wp_import_terms_" . $this->import_data_key);
467 + $processed_templates = $this->get_progress([], "wp_import_terms_" . $this->import_data_key);
478 468 if (!empty($processed_templates)) {
479 - $result = $this->get_loop_result([], "wp_import_terms_" . $this->import_data_key);
469 + $result = $this->get_result([], "wp_import_terms_" . $this->import_data_key);
480 470 return $result;
481 471 }
482 472
483 473 $this->terms = apply_filters( 'wp_import_terms', $this->terms );
@@ -561,9 +551,9 @@
561 551
562 552 unset( $this->terms );
563 553
564 554 // Add the template to the processed templates and update the session data
565 - $this->set_loop_result( $result, "wp_import_terms_" . $this->import_data_key);
555 + $this->update_progress( true, $result, "wp_import_terms_" . $this->import_data_key);
566 556 return $result;
567 557 }
568 558
569 559 /**
@@ -1142,9 +1132,9 @@
1142 1132
1143 1133 if($saved_image = $this->get_saved_image($url)){
1144 1134 // $this->url_remap[ $url ] = wp_get_attachment_url( $saved_image );
1145 1135 // $this->url_remap[ $this->remove_extension($url) ] = $this->remove_extension(wp_get_attachment_url( $saved_image ));
1146 - $upload_url = set_url_scheme( wp_get_attachment_url( $saved_image ) );
1136 + $upload_url = wp_get_attachment_url( $saved_image );
1147 1137 $this->set_url_map($url, $upload_url, true);
1148 1138
1149 1139 if(!empty($post['original_attachment_url']) && !$this->get_saved_image($post['original_attachment_url'])){
1150 1140 add_post_meta( $saved_image, '_elementor_source_image_hash', sha1( $post['original_attachment_url'] ) );
@@ -1184,13 +1174,8 @@
1184 1174
1185 1175 $upload = apply_filters( 'templately_import_copy_attachment', null, $original_post_id, $dest_file, $upload_dir );
1186 1176 if ( null === $upload ) {
1187 1177 $upload = $this->fetch_remote_file( $url, $dest_file, $upload_dir );
1188 - }
1189 -
1190 - // Normalize URL scheme to match the current site scheme (fixes HTTP URLs on HTTPS multisites).
1191 - if ( ! is_wp_error( $upload ) && ! empty( $upload['url'] ) ) {
1192 - $upload['url'] = set_url_scheme( $upload['url'] );
1193 1178 }
1194 1179
1195 1180 $end = microtime(true);
1196 1181 $duration = $end - $start;