The development mode affects how certain parts of the WordPress application behave, which is relevant when developing for WordPress. Development mode can be set via the WP_DEVELOPMENT_MODE constant in wp-config.php.Possible values are 'core', 'plugin', 'theme', 'all', or an empty string to disable development mode. 'all' is a special value to signify that all three development modes ('core', 'plugin', and 'theme') are enabled. Development mode is considered separately from WP_DEBUG and wp_get_environment_type().It does not affect debugging output, but rather functional nuances in WordPress. This function retrieves the currently set development mode value. To check whether a specific development mode is enabled, use wp_is_development_mode().
319functionwp_get_development_mode(){320static$current_mode=null;321322if(!defined('WP_RUN_CORE_TESTS')&&null!==$current_mode){323return$current_mode;324}325326$development_mode=WP_DEVELOPMENT_MODE;327328// Exclusively for core tests, rely on the `$_wp_tests_development_mode` global.329if(defined('WP_RUN_CORE_TESTS')&&isset($GLOBALS['_wp_tests_development_mode'])){330$development_mode=$GLOBALS['_wp_tests_development_mode'];331}332333$valid_modes=array(334'core',335'plugin',336'theme',337'all',338'',339);340341if(!in_array($development_mode,$valid_modes,true)){342$development_mode='';343}344345$current_mode=$development_mode;346347return$current_mode;348}
History
Introduced in 6.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/load.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.