diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index 1948e7a794..1439825993 100644
a
|
b
|
public function _validate_header_video( $validity, $value ) { |
5936 | 5936 | $video = get_attached_file( absint( $value ) ); |
5937 | 5937 | if ( $video ) { |
5938 | 5938 | $size = filesize( $video ); |
5939 | | if ( 8 < $size / pow( 1024, 2 ) ) { // Check whether the size is larger than 8MB. |
| 5939 | if ( 8 < $size / ( 1024 ** 2 ) ) { // Check whether the size is larger than 8MB. |
5940 | 5940 | $validity->add( |
5941 | 5941 | 'size_too_large', |
5942 | 5942 | __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' ) |
diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
index e0494d8faa..215213f70b 100644
a
|
b
|
function wp_convert_bytes_to_hr( $bytes ) { |
3346 | 3346 | $units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); |
3347 | 3347 | $log = log( $bytes, KB_IN_BYTES ); |
3348 | 3348 | $power = (int) $log; |
3349 | | $size = pow( KB_IN_BYTES, $log - $power ); |
| 3349 | $size = KB_IN_BYTES ** ( $log - $power ); |
3350 | 3350 | |
3351 | 3351 | if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) { |
3352 | 3352 | $unit = $units[ $power ]; |