diff --git src/wp-admin/includes/media.php b/media.php
index c941e62..0937a82 100755
old
|
new
|
function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data |
465 | 465 | unset( $attachment['ID'] ); |
466 | 466 | |
467 | 467 | // Save the attachment metadata |
468 | | $id = wp_insert_attachment( $attachment, $file, $post_id ); |
| 468 | $id = wp_insert_attachment( $attachment, $file, $post_id, true ); |
469 | 469 | if ( ! is_wp_error( $id ) ) { |
470 | 470 | wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); |
471 | 471 | } |