Ticket #50711: 50711.diff
File 50711.diff, 874 bytes (added by , 5 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
581 581 update_post_meta( $new_attachment_id, '_wp_attachment_image_alt', wp_slash( $image_alt ) ); 582 582 } 583 583 584 if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { 585 // Set a custom header with the attachment_id. 586 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 587 header( 'X-WP-Upload-Attachment-ID: ' . $new_attachment_id ); 588 } 589 584 590 // Generate image sub-sizes and meta. 585 591 $new_image_meta = wp_generate_attachment_metadata( $new_attachment_id, $saved['path'] ); 586 592