diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 3efc93a450..16032f465a 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -4358,10 +4358,14 @@ function _doing_it_wrong( $function, $message, $version ) { * Filters whether to trigger an error for _doing_it_wrong() calls. * * @since 3.1.0 + * @since 5.0.0 Added the $function, $message and $version parameters. * - * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true. + * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true. + * @param string $function The function that was called. + * @param string $message A message explaining what has been done incorrectly. + * @param string $version The version of WordPress where the message was added. */ - if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { + if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true, $function, $message, $version ) ) { if ( function_exists( '__' ) ) { if ( is_null( $version ) ) { $version = '';