Ticket #41726: 41726.diff
File 41726.diff, 519 bytes (added by , 6 years ago) |
---|
-
wp-admin/includes/media.php
378 378 unset( $attachment['ID'] ); 379 379 380 380 // Save the data 381 $id = wp_insert_attachment( $attachment, $file, $post_id);381 $id = wp_insert_attachment( $attachment, $file, $post_id, true ); 382 382 if ( !is_wp_error($id) ) { 383 383 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 384 384 }