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
if ( !function_exists( 'wp_installing' ) ) { require_once ABSPATH . WPINC . '/load.php'; } // Optional. 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. $is_installing = null; // NOTICE! Understand what this does before running. $result = wp_installing($is_installing);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/load.php
- function wp_installing( $is_installing = null ) {
- static $installing = null;
- // Support for the `WP_INSTALLING` constant, defined before WP is loaded.
- if ( is_null( $installing ) ) {
- $installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
- }
- if ( ! is_null( $is_installing ) ) {
- $old_installing = $installing;
- $installing = $is_installing;
- return (bool) $old_installing;
- }
- return (bool) $installing;
- }