deprecated_constructor_trigger_error WordPress Filter Hook
The deprecated_constructor_trigger_error WordPress hook allows a plugin to trigger an error when a specific constructor is called. This can be useful for debugging purposes or for preventing accidental use of a deprecated class.
apply_filters( 'deprecated_constructor_trigger_error', bool $trigger ) #
Filters whether to trigger an error for deprecated functions.
Description
WP_DEBUG
must be true in addition to the filter evaluating to true.
Parameters
- $trigger
(bool)Whether to trigger the error for deprecated functions. Default true.
Source
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |