apply_filters( 'wp_inline_script_attributes', array $attributes )

Filters attributes to be added to a script tag.

Parameters

$attributes

(array) Key-value pairs representing <script> tag attributes. Only the attribute name is added to the <script> tag for entries with a boolean value, and that are true.

Source

File: wp-includes/script-loader.php

View on Trac

Changelog

Version Description
5.7.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_inline_script_attributes