Skip to content

Commit 232bc0c

Browse files
committed
Fix _deprecated_function() and _deprecated_file() so that they work correctly. Props JonathanRogers and DD32.
git-svn-id: https://develop.svn.wordpress.org/trunk@7884 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f70f8d5 commit 232bc0c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wp-includes/functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,9 +1670,9 @@ function _deprecated_function($function, $version, $replacement=null) {
16701670
// Allow plugin to filter the output error trigger
16711671
if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_function_trigger_error', true )) {
16721672
if( !is_null($replacement) )
1673-
trigger_error( printf( __("%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead."), $function, $version, $replacement ) );
1673+
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
16741674
else
1675-
trigger_error( printf( __("%1$s is <strong>deprecated</strong> since version %2$s with no alternative available."), $function, $version ) );
1675+
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
16761676
}
16771677
}
16781678

@@ -1705,9 +1705,9 @@ function _deprecated_file($file, $version, $replacement=null) {
17051705
// Allow plugin to filter the output error trigger
17061706
if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_file_trigger_error', true )) {
17071707
if( !is_null($replacement) )
1708-
trigger_error( printf( __("%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead."), $file, $version, $replacement ) );
1708+
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) );
17091709
else
1710-
trigger_error( printf( __("%1$s is <strong>deprecated</strong> since version %2$s with no alternative available."), $file, $version ) );
1710+
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) );
17111711
}
17121712
}
17131713

0 commit comments

Comments
 (0)