Ticket #24716: 24716.13.diff
File 24716.13.diff, 891 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/media.php
2631 2631 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(No title)' ); 2632 2632 } 2633 2633 2634 $bytes = filesize( get_attached_file( $attachment->ID ) ); 2635 $response['filesizeInBytes'] = $bytes; 2636 $response['filesizeHumanReadable'] = size_format( $bytes ); 2634 $attached_file = get_attached_file( $attachment->ID ); 2635 if ( file_exists( $attached_file ) ) { 2636 $bytes = filesize( $attached_file ); 2637 $response['filesizeInBytes'] = $bytes; 2638 $response['filesizeHumanReadable'] = size_format( $bytes ); 2639 } 2637 2640 2638 2641 if ( current_user_can( 'edit_post', $attachment->ID ) ) { 2639 2642 $response['nonces']['update'] = wp_create_nonce( 'update-post_' . $attachment->ID );