Changeset 38012 for trunk/src/wp-includes/load.php
- Timestamp:
- 07/08/2016 11:26:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r37985 r38012 975 975 return false; 976 976 } 977 978 /** 979 * Converts a shorthand byte value to an integer byte value. 980 * 981 * @since 2.3.0 982 * @since 4.6.0 Moved from media.php to load.php 983 * 984 * @param string $size A shorthand byte value. 985 * @return int An integer byte value. 986 */ 987 function wp_convert_hr_to_bytes( $size ) { 988 $size = strtolower( $size ); 989 $bytes = (int) $size; 990 if ( strpos( $size, 'k' ) !== false ) 991 $bytes = intval( $size ) * KB_IN_BYTES; 992 elseif ( strpos( $size, 'm' ) !== false ) 993 $bytes = intval($size) * MB_IN_BYTES; 994 elseif ( strpos( $size, 'g' ) !== false ) 995 $bytes = intval( $size ) * GB_IN_BYTES; 996 return $bytes; 997 }
Note: See TracChangeset
for help on using the changeset viewer.