Title: wp_trigger_error_trigger_error
Published: May 20, 2026

---

# apply_filters( ‘wp_trigger_error_trigger_error’, bool $trigger, string $function_name, string $message, int $error_level )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#wp--skip-link--target)

Filters whether to trigger an error.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#parameters)󠁿

 `$trigger`bool

Whether to trigger the error. Default true.

`$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.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#source)󠁿

    ```php
    if ( ! apply_filters( 'wp_trigger_error_trigger_error', true, $function_name, $message, $error_level ) ) {
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/functions.php#L6128)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/functions.php#L6128-L6128)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_trigger_error()](https://developer.wordpress.org/reference/functions/wp_trigger_error/)`wp-includes/functions.php` |

Generates a user-level error/warning/notice/deprecation message.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_trigger_error_trigger_error/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_trigger_error_trigger_error%2F)
before being able to contribute a note or feedback.