Ticket #25170: media.php.patch
File media.php.patch, 792 bytes (added by , 11 years ago) |
---|
-
wp-admin/includes/media.php
2448 2448 echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) ); 2449 2449 ?></strong> 2450 2450 </div> 2451 <div class="misc-pub-section misc-pub-filesize"> 2452 <?php _e( 'File size:' ); ?> <strong><?php 2453 $file_size_types = array( 'Bytes', 'KB', 'MB', 'GB' ); 2454 $file_size = filesize( get_attached_file( $post->ID ) ); 2455 $exp = floor( log( $file_size, 1024 ) ); 2451 2456 2457 echo round( $file_size / pow( 1024, $exp ), ( absint( $exp ) - 1 ) ) . ' ' . $file_size_types[ $exp ]; 2458 ?></strong> 2459 </div> 2460 2452 2461 <?php 2453 2462 if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): 2454 2463