Ticket #37037: 37037.2.diff
File 37037.2.diff, 1.2 KB (added by , 8 years ago) |
---|
-
deprecated.php
3329 3329 function wp_convert_bytes_to_hr( $bytes ) { 3330 3330 _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); 3331 3331 3332 $units = array( 0 => 'B', 1 => ' kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );3332 $units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); 3333 3333 $log = log( $bytes, KB_IN_BYTES ); 3334 3334 $power = (int) $log; 3335 3335 $size = pow( KB_IN_BYTES, $log - $power ); -
functions.php
237 237 /** 238 238 * Convert number of bytes largest unit bytes will fit into. 239 239 * 240 * It is easier to read 1 kB than 1024 bytes and 1 MB than 1048576 bytes. Converts240 * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts 241 241 * number of bytes to human readable number by taking the number of that unit 242 242 * that the bytes will go into it. Supports TB value. 243 243 * … … 259 259 'TB' => TB_IN_BYTES, 260 260 'GB' => GB_IN_BYTES, 261 261 'MB' => MB_IN_BYTES, 262 ' kB' => KB_IN_BYTES,262 'KB' => KB_IN_BYTES, 263 263 'B' => 1, 264 264 ); 265 265