Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: style_loader_tag

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
24
25           $href = $this->_css_href( $this->registered[$handle]->src, $ver, $handle );
26
27           $end_cond = '';
28           if ( isset($this->registered[$handle]->extra['conditional']) && $this->registered[$handle]->extra['conditional'] ) {
29                echo "<!--[if {$this->registered[$handle]->extra['conditional']}]>\n";
30                $end_cond = "<![endif]-->\n";
31           }
32
33           echo apply_filters( 'style_loader_tag', "<link rel='stylesheet' href='$href' type='text/css' media='$media' />\n", $handle );
34           if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) {
35                if ( is_bool( $this->registered[$handle]->extra['rtl'] ) )
36                     $rtl_href = str_replace( '.css', '-rtl.css', $href );
37                else
38                     $rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
39
40                echo apply_filters( 'style_loader_tag', "<link rel='stylesheet' href='$rtl_href' type='text/css' media='$media' />\n", $handle );
41           }
42
43           echo $end_cond;
44
45           // Could do something with $this->registered[$handle]->extra here to print out extra CSS rules
46 //          echo "<style type='text/css'>\n";
47 //          echo "/* <![CDATA[ */\n";
48 //          echo "/* ]]> */\n";
49 //          echo "</style>\n";