wp_installing

Check or set whether WordPress is in "installation" mode.

Description

wp_installing( (null) $is_installing = null ); 

If the WP_INSTALLING constant is defined during the bootstrap, wp_installing(). will default to true.

Parameters (1)

0. $is_installing — Optional. (null) => null
True to set WP into Installing mode, false to turn Installing mode off. Omit this parameter if you only want to fetch the current status.

Usage

  1. if ( !function_exists( 'wp_installing' ) ) { 
  2. require_once ABSPATH . WPINC . '/load.php'; 
  3.  
  4. // Optional. True to set WP into Installing mode, false to turn Installing mode off. 
  5. // Omit this parameter if you only want to fetch the current status. 
  6. $is_installing = null; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = wp_installing($is_installing); 
  10.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/load.php  
  1. function wp_installing( $is_installing = null ) { 
  2. static $installing = null; 
  3.  
  4. // Support for the `WP_INSTALLING` constant, defined before WP is loaded. 
  5. if ( is_null( $installing ) ) { 
  6. $installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING
  7.  
  8. if ( ! is_null( $is_installing ) ) { 
  9. $old_installing = $installing; 
  10. $installing = $is_installing; 
  11. return (bool) $old_installing; 
  12.  
  13. return (bool) $installing;