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().
294functionwp_get_development_mode(){295static$current_mode=null;296297if(!defined('WP_RUN_CORE_TESTS')&&null!==$current_mode){298return$current_mode;299}300301$development_mode=WP_DEVELOPMENT_MODE;302303// Exclusively for core tests, rely on the `$_wp_tests_development_mode` global.304if(defined('WP_RUN_CORE_TESTS')&&isset($GLOBALS['_wp_tests_development_mode'])){305$development_mode=$GLOBALS['_wp_tests_development_mode'];306}307308$valid_modes=array(309'core',310'plugin',311'theme',312'all',313'',314);315316if(!in_array($development_mode,$valid_modes,true)){317$development_mode='';318}319320$current_mode=$development_mode;321322return$current_mode;323}
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.7.7 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.