From ce8693de30e8da06a8a4982e321f0a33fbeee979 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 26 Feb 2007 14:03:58 +0000 Subject: WP Merge to rev 4950 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@900 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/feed.php | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) (limited to 'wp-includes/feed.php') diff --git a/wp-includes/feed.php b/wp-includes/feed.php index abee911..f7db8bf 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -10,6 +10,11 @@ function bloginfo_rss($show = '') { echo get_bloginfo_rss($show); } +function get_wp_title_rss($sep = '»') { + $title = wp_title($sep, false); + $title = apply_filters('get_wp_title_rss', $title); + return $title; +} function get_the_title_rss() { $title = get_the_title(); @@ -90,7 +95,7 @@ function comment_text_rss() { function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = 'nolongerused') { - $url = get_post_comments_feed_link();; + $url = get_post_comments_feed_link(); echo "$link_text"; } @@ -173,16 +178,26 @@ function rss_enclosure() { if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) return; - $custom_fields = get_post_custom(); - if ( is_array($custom_fields) ) { - while ( list($key, $val) = each($custom_fields) ) { - if ( $key == 'enclosure' ) { - if ( is_array($val) ) { - foreach ( (array) $val as $enc ) { - $enclosure = split( "\n", $enc ); - print "\n"; - } - } + foreach (get_post_custom() as $key => $val) { + if ($key == 'enclosure') { + foreach ((array)$val as $enc) { + $enclosure = split("\n", $enc); + echo apply_filters('rss_enclosure', '' . "\n"); + } + } + } +} + +function atom_enclosure() { + global $id, $post; + if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) + return; + + foreach (get_post_custom() as $key => $val) { + if ($key == 'enclosure') { + foreach ((array)$val as $enc) { + $enclosure = split("\n", $enc); + echo apply_filters('atom_enclosure', '' . "\n"); } } } -- cgit