wp_trigger_error_run
Fires when the given function triggers a user-level error/warning/notice/deprecation message.
Can be used for debug backtracking.
Usage
add_action( 'wp_trigger_error_run', 'wp_kama_trigger_error_run_action', 10, 3 ); /** * Function for `wp_trigger_error_run` action-hook. * * @param string $function_name The function that was called. * @param string $message A message explaining what has been done incorrectly. * @param int $error_level The designated error type for this error. * * @return void */ function wp_kama_trigger_error_run_action( $function_name, $message, $error_level ){ // action... }
- $function_name(string)
- The function that was called.
- $message(string)
- A message explaining what has been done incorrectly.
- $error_level(int)
- The designated error type for this error.
Changelog
Since 6.4.0 | Introduced. |
Where the hook is called
wp_trigger_error_run
wp-includes/functions.php 6060
do_action( 'wp_trigger_error_run', $function_name, $message, $error_level );