Changeset 624

Show
Ignore:
Timestamp:
12/18/03 08:58:07 (5 years ago)
Author:
saxmatt
Message:

Multiple categories in RSS. RSS 1.0 currently broken

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/template-functions.php

    r617 r624  
    12741274 
    12751275function the_category_rss() { 
    1276     echo convert_chars(strip_tags(get_the_category()), 'xml'); 
     1276    $categories = get_the_category(); 
     1277    foreach ($categories as $category) { 
     1278        $category->cat_name = stripslashes(convert_chars($category->cat_name)); 
     1279        echo "\n<category>$category->cat_name</category>"; 
     1280    } 
     1281 
    12771282} 
    12781283function the_category_unicode() { 
  • trunk/wp-rss2.php

    r601 r624  
    55require('wp-blog-header.php'); 
    66 
     7/* This doesn't take into account edits 
    78// Get the time of the most recent article 
    89$maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts"); 
     
    1617header("Last-Modified: " . $clast, true); 
    1718header("Etag: " . $cetag, true); 
     19*/ 
    1820 
    1921if (!isset($rss_language)) { $rss_language = 'en'; } 
     
    2123if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } 
    2224?> 
    23 <?php echo "<?xml version=\"1.0\"?".">"; ?> 
     25<?php echo '<?xml version="1.0"?'.'>'; ?> 
    2426<!-- generator="wordpress/<?php echo $b2_version ?>" --> 
    2527<rss version="2.0"  
     
    2729 
    2830<channel> 
    29     <title><?php bloginfo_rss("name") ?></title> 
    30     <link><?php bloginfo_rss("url") ?></link> 
     31    <title><?php bloginfo_rss('name') ?></title> 
     32    <link><?php bloginfo_rss('url') ?></link> 
    3133    <description><?php bloginfo_rss("description") ?></description> 
    3234    <language><?php echo $rss_language ?></language> 
     
    4244        <pubDate><?php the_time('r'); ?></pubDate> 
    4345        <author><?php the_author() ?> (mailto:<?php the_author_email() ?>)</author> 
    44         <category><?php the_category_rss() ?></category
     46        <?php the_category_rss() ?
    4547        <guid isPermaLink="false"><?php echo $id; ?>@<?php bloginfo_rss("url") ?></guid> 
    4648<?php $more = 1; if ($rss_use_excerpt) {