wp_installing() WordPress Function

This function is called when a user clicks on the "Install Wordpress" link in the admin interface. It checks for the necessary files and settings, and if everything is ready, it installs Wordpress.

wp_installing( bool $is_installing = null ) #

Check or set whether WordPress is in “installation” mode.


Description

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


Top ↑

Parameters

$is_installing

(bool)(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.

Default value: null


Top ↑

Return

(bool) True if WP is installing, otherwise false. When a $is_installing is passed, the function will report whether WP was in installing mode prior to the change to $is_installing.


Top ↑

Source

File: 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;
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.