From c1913d5ad3372e9aa89577b0f9db2a714cca0a87 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 13 Apr 2016 03:01:56 +0000 Subject: [PATCH] I18N: Remove tag and function names from two translatable strings. Add translator comments. Props andg for initial patch. Fixes #36496. git-svn-id: https://develop.svn.wordpress.org/trunk@37188 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.wp-scripts.php | 7 ++++++- src/wp-includes/functions.wp-styles.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.wp-scripts.php b/src/wp-includes/functions.wp-scripts.php index 197368c7c6..c64d51d5e9 100644 --- a/src/wp-includes/functions.wp-scripts.php +++ b/src/wp-includes/functions.wp-scripts.php @@ -107,7 +107,12 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); if ( false !== stripos( $data, '' ) ) { - _doing_it_wrong( __FUNCTION__, __( 'Do not pass script tags to wp_add_inline_script().' ), '4.5.0' ); + _doing_it_wrong( __FUNCTION__, sprintf( + /* translators: 1: script, 2: wp_add_inline_script() */ + __( 'Do not pass %1$s tags to %2$s.' ), + 'script', + 'wp_add_inline_script()' + ), '4.5' ); $data = trim( preg_replace( '#]*>(.*)#is', '$1', $data ) ); } diff --git a/src/wp-includes/functions.wp-styles.php b/src/wp-includes/functions.wp-styles.php index 3c9d64939d..37037d3d49 100644 --- a/src/wp-includes/functions.wp-styles.php +++ b/src/wp-includes/functions.wp-styles.php @@ -84,7 +84,12 @@ function wp_add_inline_style( $handle, $data ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); if ( false !== stripos( $data, '' ) ) { - _doing_it_wrong( __FUNCTION__, __( 'Do not pass style tags to wp_add_inline_style().' ), '3.7' ); + _doing_it_wrong( __FUNCTION__, sprintf( + /* translators: 1: style, 2: wp_add_inline_style() */ + __( 'Do not pass %1$s tags to %2$s.' ), + 'style', + 'wp_add_inline_style()' + ), '3.7' ); $data = trim( preg_replace( '#]*>(.*)#is', '$1', $data ) ); }