How to check if debug is true and can I use it for my own code? [duplicate]
PHP constants don’t have the leading $. Strictly, this isn’t WordPress, but since there isn’t a Core is_debug() function that I am aware of, what you want is: if (defined(‘WP_DEBUG’) && true === WP_DEBUG) { echo ‘d00d’; }