Changeset 23439
- Timestamp:
- 02/16/2013 03:07:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r23416 r23439 777 777 function wp_import_upload_form( $action ) { 778 778 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 779 $size = wp_convert_bytes_to_hr( $bytes );779 $size = size_format( $bytes ); 780 780 $upload_dir = wp_upload_dir(); 781 781 if ( ! empty( $upload_dir['error'] ) ) : -
trunk/wp-includes/deprecated.php
r23416 r23439 3365 3365 return false; 3366 3366 } 3367 3368 /** 3369 * Converts an integer byte value to a shorthand byte value. 3370 * 3371 * @since 2.3.0 3372 * @deprecated 3.6.0 3373 * @deprecated Use size_format() 3374 * 3375 * @param int $bytes An integer byte value. 3376 * @return string A shorthand byte value. 3377 */ 3378 function wp_convert_bytes_to_hr( $bytes ) { 3379 _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); 3380 return size_format( $bytes ); 3381 } -
trunk/wp-includes/media.php
r23437 r23439 1131 1131 1132 1132 /** 1133 * Converts an integer byte value to a shorthand byte value.1134 *1135 * @since 2.3.01136 *1137 * @param int $bytes An integer byte value.1138 * @return string A shorthand byte value.1139 */1140 function wp_convert_bytes_to_hr( $bytes ) {1141 $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );1142 $log = log( $bytes, 1024 );1143 $power = (int) $log;1144 $size = pow( 1024, $log - $power );1145 return $size . $units[$power];1146 }1147 1148 /**1149 1133 * Determine the maximum upload size allowed in php.ini. 1150 1134 *
Note: See TracChangeset
for help on using the changeset viewer.