WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 242 | * @since 2.6.0 |
| 243 | * @since 4.3.0 Introduced the `$href` parameter. |
| 244 | * @since 4.5.0 Introduced the `$media` parameter. |
| 245 | * |
| 246 | * @param string $tag The link tag for the enqueued style. |
| 247 | * @param string $handle The style's registered handle. |
| 248 | * @param string $href The stylesheet's source URL. |
| 249 | * @param string $media The stylesheet's media attribute. |
| 250 | */ |
| 251 | $tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media ); |
| 252 | |
| 253 | if ( 'rtl' === $this->text_direction && isset( $obj->extra['rtl'] ) && $obj->extra['rtl'] ) { |
| 254 | if ( is_bool( $obj->extra['rtl'] ) || 'replace' === $obj->extra['rtl'] ) { |
| 255 | $suffix = isset( $obj->extra['suffix'] ) ? $obj->extra['suffix'] : ''; |
| 256 | $rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $src, $ver, "$handle-rtl" ) ); |
| 257 | } else { |
| 258 | $rtl_href = $this->_css_href( $obj->extra['rtl'], $ver, "$handle-rtl" ); |
| 259 | } |
| 260 | |
| Line | Code |
| 263 | $rel, |
| 264 | $handle, |
| 265 | $title, |
| 266 | $rtl_href, |
| 267 | $this->type_attr, |
| 268 | $media |
| 269 | ); |
| 270 | |
| 271 | /** This filter is documented in wp-includes/class.wp-styles.php */ |
| 272 | $rtl_tag = apply_filters( 'style_loader_tag', $rtl_tag, $handle, $rtl_href, $media ); |
| 273 | |
| 274 | if ( 'replace' === $obj->extra['rtl'] ) { |
| 275 | $tag = $rtl_tag; |
| 276 | } else { |
| 277 | $tag .= $rtl_tag; |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | if ( $this->do_concat ) { |