On this page
WP_Site_Health::is_development_environment(): bool
Checks if the current environment type is set to ‘development’ or ‘local’.
Return
bool True if it is a development environment, false if not.
Source
File: wp-admin/includes/class-wp-site-health.php. View all references
public function is_development_environment() {
return in_array( wp_get_environment_type(), array( 'development', 'local' ), true );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_get_environment_type() wp-includes/load.php | Retrieves the current environment type. |
Used By
| Used By | Description |
|---|---|
| WP_Site_Health::wp_cron_scheduled_check() wp-admin/includes/class-wp-site-health.php | Runs the scheduled event to check and update the latest site health status for the website. |
| WP_Site_Health::enqueue_scripts() wp-admin/includes/class-wp-site-health.php | Enqueues the site health scripts. |
| WP_Site_Health::get_test_is_in_debug_mode() wp-admin/includes/class-wp-site-health.php | Tests if debug information is enabled. |
Changelog
| Version | Description |
|---|---|
| 5.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_health/is_development_environment