diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 10d7f3bffe..2738a2137b 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -467,7 +467,7 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data unset( $attachment['ID'] ); // Save the attachment metadata - $id = wp_insert_attachment( $attachment, $file, $post_id ); + $id = wp_insert_attachment( $attachment, $file, $post_id, true ); if ( ! is_wp_error( $id ) ) { wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index aabf59850c..3d9c868d9b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44633'; +$wp_version = '5.1-beta1-44634'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.