deprecated_constructor_trigger_error
Filters whether to trigger an error for deprecated functions.
WP_DEBUG must be true in addition to the filter evaluating to true.
Использование
add_filter( 'deprecated_constructor_trigger_error', 'wp_kama_deprecated_constructor_trigger_error_filter' ); /** * Function for `deprecated_constructor_trigger_error` filter-hook. * * @param bool $trigger Whether to trigger the error for deprecated functions. * * @return bool */ function wp_kama_deprecated_constructor_trigger_error_filter( $trigger ){ // filter... return $trigger; }
- $trigger(true|false)
- Whether to trigger the error for deprecated functions.
По умолчанию: true
Список изменений
С версии 4.3.0 | Введена. |
Где вызывается хук
deprecated_constructor_trigger_error
wp-includes/functions.php 5633
if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) {