Changeset 48054
- Timestamp:
- 06/16/2020 06:08:07 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r47902 r48054 451 451 function size_format( $bytes, $decimals = 0 ) { 452 452 $quant = array( 453 'TB' => TB_IN_BYTES, 454 'GB' => GB_IN_BYTES, 455 'MB' => MB_IN_BYTES, 456 'KB' => KB_IN_BYTES, 457 'B' => 1, 453 /* translators: Unit symbol for terabyte. */ 454 _x( 'TB', 'unit symbol' ) => TB_IN_BYTES, 455 /* translators: Unit symbol for gigabyte. */ 456 _x( 'GB', 'unit symbol' ) => GB_IN_BYTES, 457 /* translators: Unit symbol for megabyte. */ 458 _x( 'MB', 'unit symbol' ) => MB_IN_BYTES, 459 /* translators: Unit symbol for kilobyte. */ 460 _x( 'KB', 'unit symbol' ) => KB_IN_BYTES, 461 /* translators: Unit symbol for byte. */ 462 _x( 'B', 'unit symbol' ) => 1, 458 463 ); 459 464 460 465 if ( 0 === $bytes ) { 461 return number_format_i18n( 0, $decimals ) . ' B'; 466 /* translators: Unit symbol for byte. */ 467 return number_format_i18n( 0, $decimals ) . ' ' . _x( 'B', 'unit symbol' ); 462 468 } 463 469
Note: See TracChangeset
for help on using the changeset viewer.