W3cubDocs

/WordPress

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

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

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

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/doing_it_wrong_trigger_error