Make WordPress Core


Ignore:
Timestamp:
02/16/2013 03:07:56 AM (12 years ago)
Author:
SergeyBiryukov
Message:

Deprecate wp_convert_bytes_to_hr() in favor of size_format(). props F J Kaiser. fixes #19067.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23437 r23439  
    11311131
    11321132/**
    1133  * Converts an integer byte value to a shorthand byte value.
    1134  *
    1135  * @since 2.3.0
    1136  *
    1137  * @param int $bytes An integer byte value.
    1138  * @return string A shorthand byte value.
    1139  */
    1140 function wp_convert_bytes_to_hr( $bytes ) {
    1141     $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );
    1142     $log   = log( $bytes, 1024 );
    1143     $power = (int) $log;
    1144     $size  = pow( 1024, $log - $power );
    1145     return $size . $units[$power];
    1146 }
    1147 
    1148 /**
    11491133 * Determine the maximum upload size allowed in php.ini.
    11501134 *
Note: See TracChangeset for help on using the changeset viewer.