Changes between Version 4 and Version 5 of Ticket #14889, comment 27
- Timestamp:
- 06/08/11 13:04:18 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14889, comment 27
v4 v5 4 4 function wp_convert_hr_to_bytes( $size ) { 5 5 $bytes = (float) $size; 6 $last = strtolower( substr( $size, -1 ) ); 7 $pos = strpos( ' kmg', $last , 1 ); 8 if ( $pos ) $bytes *= pow( 1024, $pos ); 6 if ( $bytes ) { 7 $last = strtolower( substr( $size, -1 ) ); 8 $pos = strpos( ' kmg', $last , 1 ); 9 if ( $pos ) $bytes *= pow( 1024, $pos ); 10 } 9 11 return round( $bytes ); 10 12 }