Ticket #25170: media.php.2.patch
File media.php.2.patch, 733 bytes (added by , 11 years ago) |
---|
-
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' ); 2451 2454 2455 if ( isset( $meta['filesize'] ) ) 2456 $file_size = $meta['filesize']; 2457 else 2458 $file_size = filesize( get_attached_file( $post->ID ) ); 2459 2460 $exp = floor( log( $file_size, 1024 ) ); 2461 2462 echo round( $file_size / pow( 1024, $exp ), ( absint( $exp ) - 1 ) ) . ' ' . $file_size_types[ $exp ]; 2463 ?></strong> 2464 </div> 2465 2452 2466 <?php 2453 2467 if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): 2454 2468