Changeset 23439 for trunk/wp-includes/media.php
- Timestamp:
- 02/16/2013 03:07:56 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.