diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php
index 197368c..5a3bb27 100644
|
a
|
b
|
function wp_add_inline_script( $handle, $data, $position = 'after' ) { |
| 107 | 107 | _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); |
| 108 | 108 | |
| 109 | 109 | if ( false !== stripos( $data, '</script>' ) ) { |
| 110 | | _doing_it_wrong( __FUNCTION__, __( 'Do not pass script tags to wp_add_inline_script().' ), '4.5.0' ); |
| | 110 | _doing_it_wrong( __FUNCTION__, sprintf( _x( 'Do not pass <code>script</code> tags to %s.', 'Do not translate the word "script"' ), 'wp_add_inline_script()' ), '4.5.0' ); |
| 111 | 111 | $data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) ); |
| 112 | 112 | } |
| 113 | 113 | |
diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php
index 3c9d649..d2c2e21 100644
|
a
|
b
|
function wp_add_inline_style( $handle, $data ) { |
| 84 | 84 | _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); |
| 85 | 85 | |
| 86 | 86 | if ( false !== stripos( $data, '</style>' ) ) { |
| 87 | | _doing_it_wrong( __FUNCTION__, __( 'Do not pass style tags to wp_add_inline_style().' ), '3.7' ); |
| | 87 | _doing_it_wrong( __FUNCTION__, sprintf( _x( 'Do not pass <code>style</code> tags to %s.', 'Do not translate the word "style"' ), 'wp_add_inline_style()' ), '3.7' ); |
| 88 | 88 | $data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) ); |
| 89 | 89 | } |
| 90 | 90 | |