Changeset 28343 for trunk/src/wp-admin/includes/media.php
- Timestamp:
- 05/07/2014 06:24:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r28297 r28343 1691 1691 $_tab = isset($tab) ? $tab : ''; 1692 1692 1693 $upload_size_unit = $max_upload_size = wp_max_upload_size(); 1694 $sizes = array( 'KB', 'MB', 'GB' ); 1695 1696 for ( $u = -1; $upload_size_unit > 1024 && $u < count( $sizes ) - 1; $u++ ) { 1697 $upload_size_unit /= 1024; 1698 } 1699 1700 if ( $u < 0 ) { 1701 $upload_size_unit = 0; 1702 $u = 0; 1703 } else { 1704 $upload_size_unit = (int) $upload_size_unit; 1693 $max_upload_size = wp_max_upload_size(); 1694 if ( ! $max_upload_size ) { 1695 $max_upload_size = 0; 1705 1696 } 1706 1697 ?> … … 1737 1728 1738 1729 $post_params = array( 1739 1740 1741 1742 1743 1730 "post_id" => $post_id, 1731 "_wpnonce" => wp_create_nonce('media-form'), 1732 "type" => $_type, 1733 "tab" => $_tab, 1734 "short" => "1", 1744 1735 ); 1745 1736 … … 1851 1842 </div> 1852 1843 1853 <span class="max-upload-size"><?php printf( __( 'Maximum upload file size: % d%s.' ), esc_html($upload_size_unit), esc_html($sizes[$u]) ); ?></span>1844 <span class="max-upload-size"><?php printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); ?></span> 1854 1845 <?php 1855 1846
Note: See TracChangeset
for help on using the changeset viewer.