enable_wp_debug_mode_checks WordPress Filter Hook

The enable_wp_debug_mode_checks hook is a core Wordpress hook that is used to enable debugging mode for certain checks. By default, this hook is not active. When activated, this hook will cause Wordpress to display a notice when certain conditions are met that would normally cause a fatal error. Additionally, this hook will also display a backtrace when a fatal error occurs.

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 runtimes. 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;
                },
            ),
        ),
    ),
);

Top ↑

Parameters

$enable_debug_mode

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


Top ↑

Source

File: wp-includes/load.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.