diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 32fa55c9df..b585d05c23 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -3778,15 +3778,19 @@ function _deprecated_function( $function, $version, $replacement = null ) {
*/
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
- if ( ! is_null( $replacement ) )
+ if ( ! is_null( $replacement ) ) {
+ /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
- else
+ } else {
+ /* translators: 1: PHP function name, 2: version number */
trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $function, $version ) );
+ }
} else {
- if ( ! is_null( $replacement ) )
+ if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( '%1$s is deprecated since version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
- else
+ } else {
trigger_error( sprintf( '%1$s is deprecated since version %2$s with no alternative available.', $function, $version ) );
+ }
}
}
}
@@ -3902,15 +3906,19 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
$message = empty( $message ) ? '' : ' ' . $message;
if ( function_exists( '__' ) ) {
- if ( ! is_null( $replacement ) )
+ if ( ! is_null( $replacement ) ) {
+ /* translators: 1: PHP file name, 2: version number, 3: alternative file name */
trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
- else
+ } else {
+ /* translators: 1: PHP file name, 2: version number */
trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $file, $version ) . $message );
+ }
} else {
- if ( ! is_null( $replacement ) )
+ if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( '%1$s is deprecated since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message );
- else
+ } else {
trigger_error( sprintf( '%1$s is deprecated since version %2$s with no alternative available.', $file, $version ) . $message );
+ }
}
}
}
@@ -3962,15 +3970,19 @@ function _deprecated_argument( $function, $version, $message = null ) {
*/
if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
- if ( ! is_null( $message ) )
+ if ( ! is_null( $message ) ) {
+ /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
trigger_error( sprintf( __('%1$s was called with an argument that is deprecated since version %2$s! %3$s'), $function, $version, $message ) );
- else
+ } else {
+ /* translators: 1: PHP function name, 2: version number */
trigger_error( sprintf( __('%1$s was called with an argument that is deprecated since version %2$s with no alternative available.'), $function, $version ) );
+ }
} else {
- if ( ! is_null( $message ) )
+ if ( ! is_null( $message ) ) {
trigger_error( sprintf( '%1$s was called with an argument that is deprecated since version %2$s! %3$s', $function, $version, $message ) );
- else
+ } else {
trigger_error( sprintf( '%1$s was called with an argument that is deprecated since version %2$s with no alternative available.', $function, $version ) );
+ }
}
}
}
@@ -4018,8 +4030,10 @@ function _deprecated_hook( $hook, $version, $replacement = null, $message = null
if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {
$message = empty( $message ) ? '' : ' ' . $message;
if ( ! is_null( $replacement ) ) {
+ /* translators: 1: PHP hook name, 2: version number, 3: alternative hook name */
trigger_error( sprintf( __( '%1$s is deprecated since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
} else {
+ /* translators: 1: PHP hook name, 2: version number */
trigger_error( sprintf( __( '%1$s is deprecated since version %2$s with no alternative available.' ), $hook, $version ) . $message );
}
}