wp_trigger_error


wp_trigger_error ( $function_name, $message, $error_level = E_USER_NOTICE )

Parameters:
  • (string) function_name The function that triggered the error.
  • (string) message The message explaining the error. The message can contain allowed HTML 'a' (with href), 'code', 'br', 'em', and 'strong' tags and http or https protocols. If it contains other HTML tags or protocols, the message should be escaped before passing to this function to avoid being stripped {@see}.
  • (int) error_level Optional. The designated error type for this error. Only works with E_USER family of constants. Default E_USER_NOTICE.
Defined at:

Description

Generates a user-level error/warning/notice/deprecation message.Generates the message when `WP_DEBUG` is true.

Related Functions

wp_get_theme_error, wp_image_editor, wp_generator, wp_get_plugin_error, wp_trim_words

Top Google Results

User discussions

wpseek mobile