mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Add file size to attachment publish meta box. props desrosj. fixes #25170.
git-svn-id: https://develop.svn.wordpress.org/trunk@25403 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
654d07ebf9
commit
435c2b5686
@ -2450,7 +2450,19 @@ function attachment_submitbox_metadata() {
|
||||
?></strong>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if ( isset( $meta['filesize'] ) )
|
||||
$file_size = $meta['filesize'];
|
||||
else
|
||||
$file_size = filesize( get_attached_file( $post->ID ) );
|
||||
|
||||
if ( ! empty( $file_size ) ) : ?>
|
||||
<div class="misc-pub-section misc-pub-filesize">
|
||||
<?php _e( 'File size:' ); ?> <strong><?php echo size_format( $file_size ); ?></strong>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ( preg_match( '#^audio|video#', $post->post_mime_type ) ):
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user