wp_trigger_error_always_run action-hookWP 7.0.0

Always fires when the given function triggers a user-level error/warning/notice/deprecation message.

Can be used to attach custom error handlers even if WP_DEBUG is not truthy.

Usage

add_action( 'wp_trigger_error_always_run', 'wp_kama_trigger_error_always_run_action', 10, 3 );

/**
 * Function for `wp_trigger_error_always_run` action-hook.
 * 
 * @param string $function_name The function that triggered the error.
 * @param string $message       The message explaining the error.
 * @param int    $error_level   The designated error type for this error.
 *
 * @return void
 */
function wp_kama_trigger_error_always_run_action( $function_name, $message, $error_level ){

	// action...
}
$function_name(string)
The function that triggered the error.
$message(string)
The message explaining the error.
$error_level(int)
The designated error type for this error.

Changelog

Since 7.0.0 Introduced.

Where the hook is called

wp_trigger_error()
wp_trigger_error_always_run
wp-includes/functions.php 6116
do_action( 'wp_trigger_error_always_run', $function_name, $message, $error_level );

Where the hook is used in WordPress

Usage not found.