From bfefe9494547d8807d280115c2d9d4ab6ee4baac Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 18 Dec 2003 08:58:07 +0000 Subject: [PATCH] Multiple categories in RSS. RSS 1.0 currently broken git-svn-id: http://svn.automattic.com/wordpress/trunk@624 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions.php | 7 ++++++- wp-rss2.php | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index a8c32ca936..d95512ff0a 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1273,7 +1273,12 @@ function the_category($seperator = '') { } function the_category_rss() { - echo convert_chars(strip_tags(get_the_category()), 'xml'); + $categories = get_the_category(); + foreach ($categories as $category) { + $category->cat_name = stripslashes(convert_chars($category->cat_name)); + echo "\n$category->cat_name"; + } + } function the_category_unicode() { $category = get_the_category(); diff --git a/wp-rss2.php b/wp-rss2.php index b68c4b51cc..59fb802985 100644 --- a/wp-rss2.php +++ b/wp-rss2.php @@ -4,6 +4,7 @@ $doing_rss = 1; header('Content-type: text/xml', true); require('wp-blog-header.php'); +/* This doesn't take into account edits // Get the time of the most recent article $maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts"); $unixtime = strtotime($maxdate); @@ -15,19 +16,20 @@ $cetag = (isset($clast)) ? md5($clast) : ''; // send it in a Last-Modified header header("Last-Modified: " . $clast, true); header("Etag: " . $cetag, true); +*/ if (!isset($rss_language)) { $rss_language = 'en'; } if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; } if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } ?> -"; ?> +'; ?> - <?php bloginfo_rss("name") ?> - + <?php bloginfo_rss('name') ?> + Copyright @@ -41,7 +43,7 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng (mailto:) - + @