style_loader_tag WordPress Filter Hook

The style_loader_tag hook is used to modify the HTML output of the style tags for enqueued stylesheets. This hook is executed immediately before the style tag is outputted in the document head.

apply_filters( 'style_loader_tag', string $tag, string $handle, string $href, string $media ) #

Filters the HTML link tag of an enqueued style.


Parameters

$tag

(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.


Top ↑

Source

File: wp-includes/class.wp-styles.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced the $media parameter.
4.3.0Introduced the $href parameter.
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.