Filter hook 'deprecated_file_trigger_error'

in WP Core File wp-includes/functions.php at line 5794

View Source

deprecated_file_trigger_error

Filter Hook
Description
Filters whether to trigger an error for deprecated files.

Hook Information

File Location wp-includes/functions.php View on GitHub
Hook Type Filter
Line Number 5794

Hook Parameters

Type Name Description
bool $trigger Whether to trigger the error for deprecated files. Default true.

Usage Examples

Basic Usage
<?php
// Hook into deprecated_file_trigger_error
add_filter('deprecated_file_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:5794 - How this hook is used in WordPress core
<?php
5789  	 *
5790  	 * @since 2.5.0
5791  	 *
5792  	 * @param bool $trigger Whether to trigger the error for deprecated files. Default true.
5793  	 */
5794  	if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
5795  		$message = empty( $message ) ? '' : ' ' . $message;
5796  
5797  		if ( function_exists( '__' ) ) {
5798  			if ( $replacement ) {
5799  				$message = sprintf(

PHP Documentation

<?php
/**
	 * Filters whether to trigger an error for deprecated files.
	 *
	 * @since 2.5.0
	 *
	 * @param bool $trigger Whether to trigger the error for deprecated files. 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.