Make WordPress Core

Changeset 38011


Ignore:
Timestamp:
07/08/2016 11:18:19 AM (9 years ago)
Author:
ocean90
Message:

Constants: Move constants for data sizes before constants for memory limits.

This allows us to improve core's memory limit handling.

See #32075.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-constants.php

    r37674 r38011  
    1717function wp_initial_constants() {
    1818    global $blog_id;
     19
     20    /**#@+
     21     * Constants for expressing human-readable data sizes in their respective number of bytes.
     22     *
     23     * @since 4.4.0
     24     */
     25    define( 'KB_IN_BYTES', 1024 );
     26    define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
     27    define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
     28    define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
     29    /**#@-*/
    1930
    2031    // set memory limits
     
    111122    define( 'YEAR_IN_SECONDS',  365 * DAY_IN_SECONDS    );
    112123    /**#@-*/
    113 
    114     /**#@+
    115      * Constants for expressing human-readable data sizes in their respective number of bytes.
    116      *
    117      * @since 4.4.0
    118      */
    119     define( 'KB_IN_BYTES', 1024 );
    120     define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
    121     define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
    122     define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
    123     /**#@-*/
    124124}
    125125
Note: See TracChangeset for help on using the changeset viewer.