Skip to Content


If the debug query string is being used.

PHP April 27, 2017




(Optional) (Integer) How strict to limit debug checks
Default: false

Parameter Notes

Strict as 0 or false allows any visitor to use the query string.

Strict as 1 or true requires the user to be a developer or client.

Strict as 2 requires the user to be a developer or client and be logged in to WordPress.

Request or provide clarification »

Source File

Located in /libs/Utilities/Utilities.php on line 307.

1 Hook

Find these filters and actions in the source code below to hook into them. Use do_action() and add_filter() in your functions file or plugin.

Need a new filter hook? Request one here.

This function has no action hooks available. Request one?

        public function is_debug($strict=false){
            $override = apply_filters('pre_is_debug', null, $strict);
            if ( isset($override) ){return $override;}

            $very_strict = ( $strict > 1 )? $strict : false;
            if ( array_key_exists('debug', $_GET) ){
                if ( !empty($strict) ){
                    if ( $this->is_dev($very_strict) || $this->is_client($very_strict) ){
                        return true;
                    return false;
                return true;
            return false;


To override this PHP function, use this hook in your child theme or plugin ("my_custom" can be changed):

add_filter('pre_is_debug', 'my_custom_is_debug', 10, 2); //The last integer must be 1 more than the actual parameters
function my_custom_is_debug($null, $strict){ //$null is required, but can be ignored
    //Write your own code here

    return true; //Return true to prevent the original function from running afterwords

You can completely disable this PHP function with a single line actions:

 add_filter('pre_is_debug', '__return_false');