WordPress at a glance
function is not described

wp_print_inline_script_tag() WP 5.7.0

Prints inline JavaScript wrapped in <script> tag.

It is possible to inject attributes in the <script> tag via the 'wp_script_attributes' filter. Automatically injects type attribute if needed.

No Hooks.


null. Null. Nothing.


wp_print_inline_script_tag( $javascript, $attributes );
$javascript(string) (required)
Inline JavaScript code.
Key-value pairs representing <script> tag attributes.


Since 5.7.0 Introduced.

Code of wp_print_inline_script_tag() WP 5.7

function wp_print_inline_script_tag( $javascript, $attributes = array() ) {
	echo wp_get_inline_script_tag( $javascript, $attributes );