Changeset 37702
- Timestamp:
- 06/14/2016 09:40:02 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/deprecated.php
r37676 r37702 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; -
trunk/src/wp-includes/functions.php
r37689 r37702 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. … … 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 ); -
trunk/tests/phpunit/tests/media.php
r37627 r37702 274 274 $this->assertEquals( '1GB', wp_convert_bytes_to_hr( $gb ) ); 275 275 $this->assertEquals( '1MB', wp_convert_bytes_to_hr( $mb ) ); 276 $this->assertEquals( '1 kB', wp_convert_bytes_to_hr( $kb ) );276 $this->assertEquals( '1KB', wp_convert_bytes_to_hr( $kb ) ); 277 277 278 278 $this->assertEquals( '1 TB', size_format( $tb ) ); 279 279 $this->assertEquals( '1 GB', size_format( $gb ) ); 280 280 $this->assertEquals( '1 MB', size_format( $mb ) ); 281 $this->assertEquals( '1 kB', size_format( $kb ) );281 $this->assertEquals( '1 KB', size_format( $kb ) ); 282 282 283 283 // now some values around
Note: See TracChangeset
for help on using the changeset viewer.