Filters attributes to be added to a script tag.
$attributesarraywp-includes/script-loader.php:2941wp_get_script_tag() * @since 5.7.0 * * @param array $attributes 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. */ $attributes = apply_filters( 'wp_script_attributes', $attributes ); $processor = new WP_HTML_Tag_Processor( '<script></script>' ); $processor->next_tag(); foreach ( $attributes as $name => $value ) { /* * Lexical variations of an attribute name may represent theIntroduced in 5.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.