Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_bloginfo_rss

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
1 <?php
2
3 function get_bloginfo_rss($show = '') {
4      $info = strip_tags(get_bloginfo($show));
5      return apply_filters('get_bloginfo_rss', convert_chars($info), $show);
6 }
7
8 function bloginfo_rss($show = '') {
9      echo apply_filters('bloginfo_rss', get_bloginfo_rss($show), $show);
10 }
11
12 function get_default_feed() {
13      return apply_filters('default_feed', 'rss2');
14 }
 
Line Code
128           $cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);
129      }
130
131      $cat_names = array_unique($cat_names);
132
133      foreach ( $cat_names as $cat_name ) {
134           if ( 'rdf' == $type )
135                $the_list .= "\n\t\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\n";
136           elseif ( 'atom' == $type )
137                $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), attribute_escape( $cat_name ) );
138           else
139                $the_list .= "\n\t\t<category><![CDATA[$cat_name]]></category>\n";
140      }
141
142      return apply_filters('the_category_rss', $the_list, $type);
143 }
144
145 function the_category_rss($type = 'rss') {
146      echo get_the_category_rss($type);