WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2015 03:01:27 AM (5 years ago)
Author:
boonebgorges
Message:

Move wp_installing() to load.php.

Various functions in load.php need to check whether WP is in installation mode.
Let's let them.

Props adamsilverstein.
See #31130.

File:
1 edited

Legend:

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

    r34894 r34896  
    12561256     */
    12571257    echo apply_filters( 'robots_txt', $output, $public );
    1258 }
    1259 
    1260 /**
    1261  * Check or set whether WordPress is in "installation" mode.
    1262  *
    1263  * If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`.
    1264  *
    1265  * @since 4.4.0
    1266  *
    1267  * @staticvar bool $installing
    1268  *
    1269  * @param bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off.
    1270  *                            Omit this parameter if you only want to fetch the current status.
    1271  * @return bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will
    1272  *              report whether WP was in installing mode prior to the change to `$is_installing`.
    1273  */
    1274 function wp_installing( $is_installing = null ) {
    1275     static $installing = null;
    1276 
    1277     // Support for the `WP_INSTALLING` constant, defined before WP is loaded.
    1278     if ( is_null( $installing ) ) {
    1279         $installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
    1280     }
    1281 
    1282     if ( ! is_null( $is_installing ) ) {
    1283         $old_installing = $installing;
    1284         $installing = $is_installing;
    1285         return (bool) $old_installing;
    1286     }
    1287 
    1288     return (bool) $installing;
    12891258}
    12901259
Note: See TracChangeset for help on using the changeset viewer.