apply_filters( 'enable_wp_debug_mode_checks', bool $enable_debug_mode )

Filters whether to allow the debug mode check to occur.

Description

This filter runs before it can be used by plugins. It is designed for non-web run-times. Returning false causes the WP_DEBUG and related constants to not be checked and the default PHP values for errors will be used unless you take care to update them yourself.

To use this filter you must define a $wp_filter global before WordPress loads, usually in wp-config.php.

Example:

$GLOBALS['wp_filter'] = array(
    'enable_wp_debug_mode_checks' => array(
        10 => array(
            array(
                'accepted_args' => 0,
                'function'      => function() {
                    return false;
                },
            ),
        ),
    ),
);

Parameters

$enable_debug_mode

(bool) Whether to enable debug mode checks to occur. Default true.

Source

File: wp-includes/load.php

View on Trac

Changelog

Version Description
4.6.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks