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
This commit is contained in:
Sergey Biryukov
2016-04-13 03:01:56 +00:00
parent f0bc007421
commit c1913d5ad3
2 changed files with 12 additions and 2 deletions

View File

@@ -107,7 +107,12 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
if ( false !== stripos( $data, '</script>' ) ) {
_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.' ),
'<code>script</code>',
'<code>wp_add_inline_script()</code>'
), '4.5' );
$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );
}