diff --git a/wp-includes/load.php b/wp-includes/load.php index c6ff6cb4c1..6699495fc4 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -974,3 +974,24 @@ function is_ssl() { } return false; } + +/** + * Converts a shorthand byte value to an integer byte value. + * + * @since 2.3.0 + * @since 4.6.0 Moved from media.php to load.php + * + * @param string $size A shorthand byte value. + * @return int An integer byte value. + */ +function wp_convert_hr_to_bytes( $size ) { + $size = strtolower( $size ); + $bytes = (int) $size; + if ( strpos( $size, 'k' ) !== false ) + $bytes = intval( $size ) * KB_IN_BYTES; + elseif ( strpos( $size, 'm' ) !== false ) + $bytes = intval($size) * MB_IN_BYTES; + elseif ( strpos( $size, 'g' ) !== false ) + $bytes = intval( $size ) * GB_IN_BYTES; + return $bytes; +} diff --git a/wp-includes/media.php b/wp-includes/media.php index 6a060b1c30..df96a17cf8 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -2776,26 +2776,6 @@ function wp_expand_dimensions( $example_width, $example_height, $max_width, $max return wp_constrain_dimensions( $example_width * 1000000, $example_height * 1000000, $max_width, $max_height ); } -/** - * Converts a shorthand byte value to an integer byte value. - * - * @since 2.3.0 - * - * @param string $size A shorthand byte value. - * @return int An integer byte value. - */ -function wp_convert_hr_to_bytes( $size ) { - $size = strtolower( $size ); - $bytes = (int) $size; - if ( strpos( $size, 'k' ) !== false ) - $bytes = intval( $size ) * KB_IN_BYTES; - elseif ( strpos( $size, 'm' ) !== false ) - $bytes = intval($size) * MB_IN_BYTES; - elseif ( strpos( $size, 'g' ) !== false ) - $bytes = intval( $size ) * GB_IN_BYTES; - return $bytes; -} - /** * Determines the maximum upload size allowed in php.ini. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 50bb575c31..1cb0a582e6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta2-38011'; +$wp_version = '4.6-beta2-38012'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.