deprecated_function_trigger_error
Filter HookDescription
Filters whether to trigger an error for deprecated functions.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5551 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$trigger
|
Whether to trigger the error for deprecated functions. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into deprecated_function_trigger_error
add_filter('deprecated_function_trigger_error', 'my_custom_filter', 10, 1);
function my_custom_filter($trigger) {
// Your custom filtering logic here
return $trigger;
}
Source Code Context
wp-includes/functions.php:5551
- How this hook is used in WordPress core
<?php
5546 *
5547 * @since 2.5.0
5548 *
5549 * @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
5550 */
5551 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
5552 if ( function_exists( '__' ) ) {
5553 if ( $replacement ) {
5554 $message = sprintf(
5555 /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */
5556 __( 'Function %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
PHP Documentation
<?php
/**
* Filters whether to trigger an error for deprecated functions.
*
* @since 2.5.0
*
* @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.