wphooks.info - script_loader_tag

script_loader_tag

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/class.wp-scripts.php:
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
		/**
		 * Filters the HTML script tag of an enqueued script.
		 *
		 * @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;
		}

		return true;
	}