WordPress.org

Make WordPress Core

Ticket #37037: 37037.2.diff

File 37037.2.diff, 1.2 KB (added by Presskopp, 6 years ago)

let the externals alone

  • deprecated.php

     
    33293329function wp_convert_bytes_to_hr( $bytes ) {
    33303330        _deprecated_function( __FUNCTION__, '3.6', 'size_format()' );
    33313331
    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' );
    33333333        $log   = log( $bytes, KB_IN_BYTES );
    33343334        $power = (int) $log;
    33353335        $size  = pow( KB_IN_BYTES, $log - $power );
  • functions.php

     
    237237/**
    238238 * Convert number of bytes largest unit bytes will fit into.
    239239 *
    240  * It is easier to read 1 kB than 1024 bytes and 1 MB than 1048576 bytes. Converts
     240 * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts
    241241 * number of bytes to human readable number by taking the number of that unit
    242242 * that the bytes will go into it. Supports TB value.
    243243 *
     
    259259                'TB' => TB_IN_BYTES,
    260260                'GB' => GB_IN_BYTES,
    261261                'MB' => MB_IN_BYTES,
    262                 'kB' => KB_IN_BYTES,
     262                'KB' => KB_IN_BYTES,
    263263                'B'  => 1,
    264264        );
    265265