Title: deprecated_constructor_trigger_error
Published: August 18, 2015
Last modified: February 24, 2026

---

# apply_filters( ‘deprecated_constructor_trigger_error’, bool $trigger )

## In this article

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

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

Filters whether to trigger an error for deprecated functions.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/deprecated_constructor_trigger_error/?output_format=md#description)󠁿

`WP_DEBUG` must be true in addition to the filter evaluating to true.

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

 `$trigger`bool

Whether to trigger the error for deprecated functions. Default true.

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

    ```php
    if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) {
    ```

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

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

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

Marks a constructor as deprecated and informs when it has been used.

  |

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

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

## User Contributed Notes

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