enable_wp_debug_mode_checks
Это хук WordPress - enable_wp_debug_mode_checks. Плагин его просто использует.
Filters whether to allow the debug mode check to occur.
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.
Использование
add_filter( 'enable_wp_debug_mode_checks', 'wp_kama_enable_wp_debug_mode_checks_filter' );
/**
* Function for `enable_wp_debug_mode_checks` filter-hook.
*
* @param bool $enable_debug_mode Whether to enable debug mode checks to occur.
*
* @return bool
*/
function wp_kama_enable_wp_debug_mode_checks_filter( $enable_debug_mode ){
// filter...
return $enable_debug_mode;
}
- $enable_debug_mode(true|false)
- Whether to enable debug mode checks to occur.
По умолчанию: true
Список изменений
| С версии 4.6.0 | Введена. |
Где вызывается хук
В файле: /php/wp-settings-cli.php
enable_wp_debug_mode_checks
wp-cli/php/wp-settings-cli.php 98
if ( apply_filters( 'enable_wp_debug_mode_checks', true ) ) {