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: http://svn.automattic.com/wordpress/trunk@19044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-23 17:51:14 +00:00
parent 1a37559654
commit ffcb6aba46
1 changed files with 1 additions and 1 deletions

View File

@ -3530,12 +3530,12 @@ function _deprecated_argument( $function, $version, $message = null ) {
*/
function _doing_it_wrong( $function, $message, $version ) {
$message .= ' ' . __('Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> 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 <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
}
}