Core Function
View Source on Trac ↗ wp_sanitize_script_attributes()
wp_sanitize_script_attributes( mixed $attributes ) Sanitizes an attributes array into an attributes string to be placed inside a `<script>` tag.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $attributes array | Key-value pairs representing `<script>` tag attributes. Required |
Return Value
(string)
String made of sanitized `<script>` tag attributes.
Function Information
Since Version
5.7.0
Source File
wp-includes/script-loader.php
Advertisement