style_loader_tag filter-hook . WP 2.6.0
Filters the HTML link tag of an enqueued style.
Usage
add_filter( 'style_loader_tag', 'filter_function_name_9233', 10, 4 ); function filter_function_name_9233( $html, $handle, $href, $media ){ // filter... return $html; }
- $html(string)
- The link tag for the enqueued style.
- $handle(string)
- The style's registered handle.
- $href(string)
- The stylesheet's source URL.
- $media(string)
- The stylesheet's media attribute.
Changelog
Since 2.6.0 | Introduced. |
Since 4.3.0 | Introduced the $href parameter. |
Since 4.5.0 | Introduced the $media parameter. |
Where the hook is called
style_loader_tag
wp-includes/class.wp-styles.php 251
$tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media );
wp-includes/class.wp-styles.php 272
$rtl_tag = apply_filters( 'style_loader_tag', $rtl_tag, $handle, $rtl_href, $media );