@@ 362-367 (lines=6) @@ | ||
359 | ||
360 | $has_original_media = Jetpack_Media::get_original_media( $media_id ); |
|
361 | ||
362 | if ( ! $has_original_media ) { |
|
363 | // The first time that the media is updated |
|
364 | // the original media is stored into the revision_history |
|
365 | $snapshot = $this->get_snapshot( $media_item ); |
|
366 | add_post_meta( $media_id, Jetpack_Media::$WP_ORIGINAL_MEDIA, $snapshot, true ); |
|
367 | } |
|
368 | ||
369 | // save the temporal file locally |
|
370 | $temporal_file = $media_file ? $media_file : $this->build_file_array_from_url( $media_id, $media_url ); |
@@ 452-457 (lines=6) @@ | ||
449 | $media_item = get_post( $media_id ); |
|
450 | $has_original_media = self::get_original_media( $media_id ); |
|
451 | ||
452 | if ( ! $has_original_media ) { |
|
453 | // The first time that the media is updated |
|
454 | // the original media is stored into the revision_history |
|
455 | $snapshot = self::get_snapshot( $media_item ); |
|
456 | add_post_meta( $media_id, self::$WP_ORIGINAL_MEDIA, $snapshot, true ); |
|
457 | } |
|
458 | ||
459 | // save temporary file in the correct location |
|
460 | $uploaded_file = self::save_temporary_file( $file_array, $media_id ); |