WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2015 02:02:59 PM (5 years ago)
Author:
DrewAPicture
Message:

Filesystem: Following the introduction of the KB|MB|GB|TB_IN_BYTES constants in [35286], use them in various places in core.

Props sudar.
Fixes #22405.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r35288 r35325  
    211211function size_format( $bytes, $decimals = 0 ) {
    212212    $quant = array(
    213         // ========================= Origin ====
    214         'TB' => 1099511627776,  // pow( 1024, 4)
    215         'GB' => 1073741824,     // pow( 1024, 3)
    216         'MB' => 1048576,        // pow( 1024, 2)
    217         'kB' => 1024,           // pow( 1024, 1)
    218         'B'  => 1,              // pow( 1024, 0)
     213        'TB' => TB_IN_BYTES,
     214        'GB' => GB_IN_BYTES,
     215        'MB' => MB_IN_BYTES,
     216        'kB' => KB_IN_BYTES,
     217        'B'  => 1,
    219218    );
    220219
Note: See TracChangeset for help on using the changeset viewer.