apply_filters( ‘doing_it_wrong_trigger_error’, bool $trigger, string $function_name, string $message, string $version )

In this article

Filters whether to trigger an error for _doing_it_wrong() calls.

Parameters

$triggerbool
Whether to trigger the error for _doing_it_wrong() calls. Default true.
$function_namestring
The function that was called.
$messagestring
A message explaining what has been done incorrectly.
$versionstring
The version of WordPress where the message was added.

Source

if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true, $function_name, $message, $version ) ) {

Changelog

VersionDescription
5.1.0Added the $function_name, $message and $version parameters.
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.