deprecated_hook_trigger_error
Filters whether to trigger deprecated hook errors.
Description
Parameters (1)
- 0. $true (bool) =>
true
- Whether to trigger deprecated hook errors. Requires WP_DEBUG to be defined true.
Usage
- To run the hook, copy the example below.
- $true = apply_filters( 'deprecated_hook_trigger_error', $true );
- if ( !empty( $true ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the deprecated_hook_trigger_error callback
- function filter_deprecated_hook_trigger_error( $true ) {
- // make filter magic happen here...
- return $true;
- };
- // add the filter
- add_filter( 'deprecated_hook_trigger_error', 'filter_deprecated_hook_trigger_error', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'deprecated_hook_trigger_error', 'filter_deprecated_hook_trigger_error', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/functions.php
- if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {