From 94cb07029981e779ed74a22cde9ba3032680c6b1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 23 Oct 2011 17:51:14 +0000 Subject: [PATCH] In _doing_it_wrong(), don't append the Debugging_in_WordPress message until we go to print a message. Send a clean message to the action. see #18453. git-svn-id: https://develop.svn.wordpress.org/trunk@19044 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2c315baa44..7fade59eb5 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3530,12 +3530,12 @@ function _deprecated_argument( $function, $version, $message = null ) { */ function _doing_it_wrong( $function, $message, $version ) { - $message .= ' ' . __('Please see Debugging in WordPress for more information.'); do_action( 'doing_it_wrong_run', $function, $message, $version ); // Allow plugin to filter the output error trigger if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); + $message .= ' ' . __( 'Please see Debugging in WordPress for more information.' ); trigger_error( sprintf( __( '%1$s was called incorrectly. %2$s %3$s' ), $function, $message, $version ) ); } }