Make WordPress Core

Ticket #40875: 40875.diff

File 40875.diff, 1.3 KB (added by Presskopp, 7 years ago)
  • wp-includes/default-constants.php

     
    2626        define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
    2727        define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
    2828        define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
     29        define( 'PB_IN_BYTES', 1024 * TB_IN_BYTES );
    2930        /**#@-*/
    3031
    3132        $current_limit     = @ini_get( 'memory_limit' );
  • wp-includes/functions.php

     
    236236 *
    237237 * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts
    238238 * number of bytes to human readable number by taking the number of that unit
    239  * that the bytes will go into it. Supports TB value.
     239 * that the bytes will go into it. Supports TB and PB value.
    240240 *
    241241 * Please note that integers in PHP are limited to 32 bits, unless they are on
    242242 * 64 bit architecture, then they have 64 bit size. If you need to place the
     
    253253 */
    254254function size_format( $bytes, $decimals = 0 ) {
    255255        $quant = array(
     256                'PB' => PB_IN_BYTES,
    256257                'TB' => TB_IN_BYTES,
    257258                'GB' => GB_IN_BYTES,
    258259                'MB' => MB_IN_BYTES,