deprecated_file_trigger_error filter-hookWP 2.5.0

Filters whether to trigger an error for deprecated files.

Usage

add_filter( 'deprecated_file_trigger_error', 'wp_kama_deprecated_file_trigger_error_filter' );

/**
 * Function for `deprecated_file_trigger_error` filter-hook.
 * 
 * @param bool $trigger Whether to trigger the error for deprecated files.
 *
 * @return bool
 */
function wp_kama_deprecated_file_trigger_error_filter( $trigger ){

	// filter...
	return $trigger;
}
$trigger(true|false)
Whether to trigger the error for deprecated files.
Default: true

Changelog

Since 2.5.0 Introduced.

Where the hook is called

_deprecated_file()
deprecated_file_trigger_error
wp-includes/functions.php 5556
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {

Where the hook is used in WordPress

wp-includes/blocks/post-comments.php 41
add_filter( 'deprecated_file_trigger_error', '__return_false' );
wp-includes/blocks/post-comments.php 43
remove_filter( 'deprecated_file_trigger_error', '__return_false' );