Changeset 46421
- Timestamp:
- 10/07/2019 03:28:29 PM (5 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r46382 r46421 2442 2442 } 2443 2443 2444 // Set a custom header with the attachment_id. 2445 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 2446 if ( ! headers_sent() ) { 2447 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 2448 } 2449 2444 2450 // This can still be pretty slow and cause timeout or out of memory errors. 2445 2451 // The js that handles the response would need to also handle HTTP 500 errors. -
trunk/src/wp-admin/includes/image.php
r46398 r46421 253 253 } 254 254 255 // Set a custom header with the attachment_id.256 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.257 if ( ! headers_sent() ) {258 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id );259 }260 261 255 // Resize the image 262 256 $resized = $editor->resize( $threshold, $threshold ); … … 297 291 // This image cannot be edited. 298 292 return $image_meta; 299 }300 301 if ( ! headers_sent() ) {302 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id );303 293 } 304 294 … … 400 390 // The image cannot be edited. 401 391 return $image_meta; 402 }403 404 // Set a custom header with the attachment_id.405 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.406 if ( ! headers_sent() ) {407 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id );408 392 } 409 393 -
trunk/src/wp-admin/includes/media.php
r46382 r46421 409 409 410 410 if ( ! is_wp_error( $attachment_id ) ) { 411 // Set a custom header with the attachment_id. 412 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 413 if ( ! headers_sent() ) { 414 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 415 } 416 411 417 // The image sub-sizes are created during wp_generate_attachment_metadata(). 412 418 // This is generally slow and may cause timeouts or out of memory errors.
Note: See TracChangeset
for help on using the changeset viewer.