Changeset 52955 for trunk/src/wp-includes/functions.php
- Timestamp:
- 03/18/2022 08:46:17 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r52933 r52955 442 442 443 443 /** 444 * Convert number of bytes largest unitbytes will fit into.444 * Converts a number of bytes to the largest unit the bytes will fit into. 445 445 * 446 446 * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts 447 447 * number of bytes to human readable number by taking the number of that unit 448 * that the bytes will go into it. Supports TB value.448 * that the bytes will go into it. Supports YB value. 449 449 * 450 450 * Please note that integers in PHP are limited to 32 bits, unless they are on … … 456 456 * 457 457 * @since 2.3.0 458 * @since 6.0.0 Support for PB, EB, ZB, and YB was added. 458 459 * 459 460 * @param int|string $bytes Number of bytes. Note max integer size for integers. … … 463 464 function size_format( $bytes, $decimals = 0 ) { 464 465 $quant = array( 466 /* translators: Unit symbol for yottabyte. */ 467 _x( 'YB', 'unit symbol' ) => YB_IN_BYTES, 468 /* translators: Unit symbol for zettabyte. */ 469 _x( 'ZB', 'unit symbol' ) => ZB_IN_BYTES, 470 /* translators: Unit symbol for exabyte. */ 471 _x( 'EB', 'unit symbol' ) => EB_IN_BYTES, 472 /* translators: Unit symbol for petabyte. */ 473 _x( 'PB', 'unit symbol' ) => PB_IN_BYTES, 465 474 /* translators: Unit symbol for terabyte. */ 466 475 _x( 'TB', 'unit symbol' ) => TB_IN_BYTES,
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)