wppaste
WordPress

apply_filters( 'script_loader_tag', string $tag, string $handle, string $src )

Since
4.1.0
Filters the HTML script tag of an enqueued script.

Parameters

$tagstring
The <script> tag for the enqueued script.
$handlestring
The script's registered handle.
$srcstring
The script's source URL.

Fired at · 1

  • wp-includes/class-wp-scripts.php:441WP_Scripts::do_item()

Source

		 * @since 4.1.0		 *		 * @param string $tag    The `<script>` tag for the enqueued script.		 * @param string $handle The script's registered handle.		 * @param string $src    The script's source URL.		 */		$tag = apply_filters( 'script_loader_tag', $tag, $handle, $src ); 		if ( $this->do_concat ) {			$this->print_html .= $tag;		} else {			echo $tag;		}

History

Introduced in 4.1.0. Unchanged from 6.7.7 through 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.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, 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.