Checks or sets whether WordPress is in “installation” mode.
If the WP_INSTALLING constant is defined during the bootstrap, wp_installing() will default to true.
$is_installingbooloptional
Default:null
$is_installing is passed, the function will report whether WP was in installing mode prior to the change to $is_installing.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;
}
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_installing