Changeset 46382 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 10/03/2019 09:00:10 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r46368 r46382 252 252 } 253 253 254 // Set a custom header with the attachment_id. 255 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 256 if ( ! headers_sent() ) { 257 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 258 } 259 254 260 // Resize the image 255 261 $resized = $editor->resize( $threshold, $threshold ); … … 274 280 $image_meta['image_meta']['orientation'] = 1; 275 281 } 282 283 wp_update_attachment_metadata( $attachment_id, $image_meta ); 276 284 } else { 277 285 // TODO: handle errors. … … 288 296 // This image cannot be edited. 289 297 return $image_meta; 298 } 299 300 if ( ! headers_sent() ) { 301 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 290 302 } 291 303 … … 304 316 $image_meta['image_meta']['orientation'] = 1; 305 317 } 318 319 wp_update_attachment_metadata( $attachment_id, $image_meta ); 306 320 } else { 307 321 // TODO: handle errors. … … 385 399 // The image cannot be edited. 386 400 return $image_meta; 401 } 402 403 // Set a custom header with the attachment_id. 404 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 405 if ( ! headers_sent() ) { 406 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 387 407 } 388 408
Note: See TracChangeset
for help on using the changeset viewer.