| @@ -1142,9 +1142,9 @@ | ||
| 1142 | 1142 | |
| 1143 | 1143 | if($saved_image = $this->get_saved_image($url)){ |
| 1144 | 1144 | // $this->url_remap[ $url ] = wp_get_attachment_url( $saved_image ); |
| 1145 | 1145 | // $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 ) ); | |
| 1146 | + $upload_url = wp_get_attachment_url( $saved_image ); | |
| 1147 | 1147 | $this->set_url_map($url, $upload_url, true); |
| 1148 | 1148 | |
| 1149 | 1149 | if(!empty($post['original_attachment_url']) && !$this->get_saved_image($post['original_attachment_url'])){ |
| 1150 | 1150 | add_post_meta( $saved_image, '_elementor_source_image_hash', sha1( $post['original_attachment_url'] ) ); |
| @@ -1184,13 +1184,8 @@ | ||
| 1184 | 1184 | |
| 1185 | 1185 | $upload = apply_filters( 'templately_import_copy_attachment', null, $original_post_id, $dest_file, $upload_dir ); |
| 1186 | 1186 | if ( null === $upload ) { |
| 1187 | 1187 | $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 | 1188 | } |
| 1194 | 1189 | |
| 1195 | 1190 | $end = microtime(true); |
| 1196 | 1191 | $duration = $end - $start; |