mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
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:
@@ -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 ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user