er.php#L2801) [ View on GitHub ](https://github.com/WordPress/wordpress-
develop/blob/6.5/src/wp-includes/script-loader.php#L2801-L2821)

##  Hooks

[ apply_filters  ( ‘wp_script_attributes’,  array  $attributes  )
](https://developer.wordpress.org/reference/hooks/wp_script_attributes/)

    

Filters attributes to be added to a script tag.

##  Related

Uses  |  Description   
---|---  
[ wp_sanitize_script_attributes() ](https://developer.wordpress.org/reference/functions/wp_sanitize_script_attributes/) ` wp-includes/script-loader.php ` |  Sanitizes an attributes array into an attributes string to be placed inside a ` ` tag.   
[ current_theme_supports() ](https://developer.wordpress.org/reference/functions/current_theme_supports/) ` wp-includes/theme.php ` |  Checks a theme’s support for a given feature.   
[ is_admin() ](https://developer.wordpress.org/reference/functions/is_admin/) ` wp-includes/load.php ` |  Determines whether the current request is for an administrative interface page.   
[ apply_filters() ](https://developer.wordpress.org/reference/functions/apply_filters/) ` wp-includes/plugin.php ` |  Calls the callback functions that have been added to a filter hook.   
Show 2 more  Show less  Used by  |  Description   
---|---  
[ wp_print_script_tag() ](https://developer.wordpress.org/reference/functions/wp_print_script_tag/) ` wp-includes/script-loader.php ` |  Prints formatted ` ` loader tag.   
[ WP_Scripts::do_item() ](https://developer.wordpress.org/reference/classes/wp_scripts/do_item/) ` wp-includes/class-wp-scripts.php ` |  Processes a script dependency.   
  
##  Changelog

Version  |  Description   
---|---  
[ 5.7.0 ](https://developer.wordpress.org/reference/since/5.7.0/) |  Introduced.   
  
##  User Contributed Notes

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_get_script_tag%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)