wp_print_script_tag( array $attributes )

Prints formatted loader tag.

Description Description

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

Top ↑

Parameters Parameters


(array) (Required) Key-value pairs representing <script> tag attributes.

Top ↑

Source Source

File: wp-includes/script-loader.php

function wp_print_script_tag( $attributes ) {
	echo wp_get_script_tag( $attributes );

Top ↑

Changelog Changelog

Version Description
5.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.