3 function get_bloginfo_rss($show = '') {
4 $info = strip_tags(get_bloginfo($show));
5 return convert_chars($info);
8 function bloginfo_rss($show = '') {
9 echo get_bloginfo_rss($show);
12 function get_the_title_rss() {
13 $title = get_the_title();
14 $title = apply_filters('the_title', $title);
15 $title = apply_filters('the_title_rss', $title);
19 function the_title_rss() {
20 echo get_the_title_rss();
23 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
24 $content = get_the_content($more_link_text, $stripteaser, $more_file);
25 $content = apply_filters('the_content_rss', $content);
26 if ($cut && !$encode_html) {
29 if ($encode_html == 1) {
30 $content = wp_specialchars($content);
32 } elseif ($encode_html == 0) {
33 $content = make_url_footnote($content);
34 } elseif ($encode_html == 2) {
35 $content = strip_tags($content);
38 $blah = explode(' ', $content);
39 if (count($blah) > $cut) {
46 for ($i=0; $i<$k; $i++) {
47 $excerpt .= $blah[$i].' ';
49 $excerpt .= ($use_dotdotdot) ? '...' : '';
52 $content = str_replace(']]>', ']]>', $content);
56 function the_excerpt_rss() {
57 $output = get_the_excerpt(true);
58 echo apply_filters('the_excerpt_rss', $output);
61 function permalink_single_rss($file = '') {
65 function comment_link() {
66 echo get_comment_link();
69 function get_comment_author_rss() {
70 return apply_filters('comment_author_rss', get_comment_author() );
72 function comment_author_rss() {
73 echo get_comment_author_rss();
76 function comment_text_rss() {
77 $comment_text = get_comment_text();
78 $comment_text = apply_filters('comment_text_rss', $comment_text);
82 function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '') {
83 $url = comments_rss($commentsrssfilename);
84 echo "<a href='$url'>$link_text</a>";
87 function comments_rss($commentsrssfilename = '') {
90 if ('' != get_settings('permalink_structure'))
91 $url = trailingslashit( get_permalink() ) . 'feed/';
93 $url = get_settings('home') . "/$commentsrssfilename?feed=rss2&p=$id";
95 return apply_filters('post_comments_feed_link', $url);
98 function get_author_rss_link($echo = false, $author_id, $author_nicename) {
99 $auth_ID = $author_id;
100 $permalink_structure = get_settings('permalink_structure');
102 if ('' == $permalink_structure) {
103 $link = get_settings('home') . '?feed=rss2&author=' . $author_id;
105 $link = get_author_link(0, $author_id, $author_nicename);
106 $link = $link . "feed/";
109 $link = apply_filters('author_feed_link', $link);
111 if ($echo) echo $link;
115 function get_category_rss_link($echo = false, $cat_ID, $category_nicename) {
116 $permalink_structure = get_settings('permalink_structure');
118 if ('' == $permalink_structure) {
119 $link = get_settings('home') . '?feed=rss2&cat=' . $cat_ID;
121 $link = get_category_link($cat_ID);
122 $link = $link . "feed/";
125 $link = apply_filters('category_feed_link', $link);
127 if ($echo) echo $link;
131 function the_category_rss($type = 'rss') {
132 $categories = get_the_category();
134 foreach ($categories as $category) {
135 $category->cat_name = convert_chars($category->cat_name);
136 if ('rdf' == $type) {
137 $the_list .= "\n\t\t<dc:subject>$category->cat_name</dc:subject>\n";
139 $the_list .= "\n\t\t<category>$category->cat_name</category>\n";
142 echo apply_filters('the_category_rss', $the_list, $type);
145 function rss_enclosure() {
147 if (!empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password)) return;
149 $custom_fields = get_post_custom();
150 if( is_array( $custom_fields ) ) {
151 while( list( $key, $val ) = each( $custom_fields ) ) {
152 if( $key == 'enclosure' ) {
153 if (is_array($val)) {
154 foreach($val as $enc) {
155 $enclosure = split( "\n", $enc );
156 print "<enclosure url='".trim( htmlspecialchars($enclosure[ 0 ]) )."' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n";