enable_wp_debug_mode_checks
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'enable_wp_debug_mode_checks', bool $enable_debug_mode )
Описание
Этот фильтр выполняется до того, как его смогут использовать плагины. Он предназначен для не-веб-сред выполнения. Возврат false приводит к тому, что WP_DEBUG и связанные константы не проверяются, и для ошибок используются стандартные значения PHP, если вы не позаботитесь обновить их самостоятельно.
Чтобы использовать этот фильтр, необходимо определить глобальную переменную $wp_filter до загрузки WordPress, обычно в wp-config.php.
Пример:
$GLOBALS['wp_filter'] = array(
'enable_wp_debug_mode_checks' => array(
10 => array(
array(
'accepted_args' => 0,
'function' => function() {
return false;
},
),
),
),
);
Оригинал (английский)
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;
},
),
),
),
);
Фильтруемое значение
Параметры
$enable_debug_mode
bool
обязательный
Исходный код
wp-includes/load.php:609
if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ) {
История изменений
| Версия | Описание |
|---|---|
| 4.6.0 | Introduced. |

