WP_Site_Health::is_development_environment() WordPress Method

The WP_Site_Health::is_development_environment() method is used to check if the current WordPress installation is in a development environment. This is useful for checking if certain features should be enabled or disabled.

WP_Site_Health::is_development_environment() #

Checks if the current environment type is set to ‘development’ or ‘local’.


Return

(bool) True if it is a development environment, false if not.


Top ↑

Source

File: wp-admin/includes/class-wp-site-health.php

	public function is_development_environment() {
		return in_array( wp_get_environment_type(), array( 'development', 'local' ), true );
	}


Top ↑

Changelog

Changelog
VersionDescription
5.6.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.