Skip to content

Commit 862f871

Browse files
committed
Define KB_IN_BYTES, MB_IN_BYTES for WP < 4.4.
1 parent 169d7e9 commit 862f871

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/DB_Command.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,14 @@ public function size( $args, $assoc_args ) {
633633

634634
if ( ! empty( $size_format ) && isset( $db_bytes ) && ! $tables ) {
635635

636+
// These added WP 4.4.0.
637+
if ( ! defined( 'KB_IN_BYTES' ) ) {
638+
define( 'KB_IN_BYTES', 1024 );
639+
}
640+
if ( ! defined( 'MB_IN_BYTES' ) ) {
641+
define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
642+
}
643+
636644
// Display the database size as a number.
637645
switch( $size_format ) {
638646
case 'mb':

0 commit comments

Comments
 (0)