script_loader_tag

script_loader_tag

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('script_loader_tag') is found 1 times:

  • /wp-includes/class-wp-scripts.php line 441
    		 * @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;
    		}
    

See this hook used in plugins:

Examples using script_loader_tag