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/deprecated.php

    r35296 r35325  
    32853285
    32863286    $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
    3287     $log   = log( $bytes, 1024 );
     3287    $log   = log( $bytes, KB_IN_BYTES );
    32883288    $power = (int) $log;
    3289     $size  = pow( 1024, $log - $power );
     3289    $size  = pow( KB_IN_BYTES, $log - $power );
    32903290
    32913291    if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
Note: See TracChangeset for help on using the changeset viewer.