wppaste
WordPress

wp_print_script_tag( array $attributes )

Since
5.7.0
Source
wp-includes/script-loader.php:2833
Prints formatted <script> loader tag.

Description

It is possible to inject attributes in the &lt;script&gt; tag via the 'wp_script_attributes' filter.Automatically injects type attribute if needed.

Parameters

$attributesarray
Key-value pairs representing &lt;script&gt; tag attributes.

Uses · 1

Used by · 1

Source

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

History

Introduced in 5.7.0. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

7.0.4
Parameter $attributes retyped from array to untyped.verified against source
5.7.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/script-loader.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.