In `size_format()` and `wp_convert_bytes_to_hr()`, replace `kB` with `KB` for consistency with other units.

Props Presskopp, dashaluna.
Fixes #37037.
Built from https://develop.svn.wordpress.org/trunk@37702


git-svn-id: http://core.svn.wordpress.org/trunk@37668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-06-14 21:41:28 +00:00
parent c7b8333ece
commit 70984aeb6f
3 changed files with 4 additions and 4 deletions

View File

@ -3329,7 +3329,7 @@ function gd_edit_image_support($mime_type) {
function wp_convert_bytes_to_hr( $bytes ) {
_deprecated_function( __FUNCTION__, '3.6', 'size_format()' );
$units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
$units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
$log = log( $bytes, KB_IN_BYTES );
$power = (int) $log;
$size = pow( KB_IN_BYTES, $log - $power );

View File

@ -237,7 +237,7 @@ function number_format_i18n( $number, $decimals = 0 ) {
/**
* Convert number of bytes largest unit bytes will fit into.
*
* It is easier to read 1 kB than 1024 bytes and 1 MB than 1048576 bytes. Converts
* It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts
* number of bytes to human readable number by taking the number of that unit
* that the bytes will go into it. Supports TB value.
*
@ -259,7 +259,7 @@ function size_format( $bytes, $decimals = 0 ) {
'TB' => TB_IN_BYTES,
'GB' => GB_IN_BYTES,
'MB' => MB_IN_BYTES,
'kB' => KB_IN_BYTES,
'KB' => KB_IN_BYTES,
'B' => 1,
);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37701';
$wp_version = '4.6-alpha-37702';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.