WordPress.org

Make WordPress Core

Ticket #4253: rss-category-description.diff

File rss-category-description.diff, 3.6 KB (added by RuddO, 11 years ago)

Updated patch for 2.2

  • wp-includes/feed-rss2.php

     
    1616<channel>
    1717        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    1818        <link><?php bloginfo_rss('url') ?></link>
    19         <description><?php bloginfo_rss("description") ?></description>
     19        <description><?php
     20if (get_query_var('cat')) {
     21       $cat = get_category(intval(get_query_var('cat')));
     22       $desc = $cat->cat_description;
     23       print $desc;
     24} else { ?><?php bloginfo_rss("description"); ?><?php } ?></description>
    2025        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
    2126        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
    2227        <language><?php echo get_option('rss_language'); ?></language>
  • wp-includes/feed-atom.php

     
    1212  <?php do_action('atom_ns'); ?>
    1313 >
    1414        <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    15         <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
     15        <subtitle type="text"><?php
     16if (get_query_var('cat')) {
     17       $cat = get_category(intval(get_query_var('cat')));
     18       $desc = $cat->cat_description;
     19       print $desc;
     20} else { ?><?php bloginfo_rss("description"); ?><?php } ?></subtitle>
    1621
    1722        <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
    1823        <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
     
    4247<?php do_action('atom_entry'); ?>
    4348        </entry>
    4449        <?php endwhile ; ?>
    45 </feed>
    46  Sin fin-de-línea al final del archivo
     50</feed>
  • wp-includes/feed-rss.php

     
    99<channel>
    1010        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    1111        <link><?php bloginfo_rss('url') ?></link>
    12         <description><?php bloginfo_rss('description') ?></description>
     12        <description><?php
     13if (get_query_var('cat')) {
     14       $cat = get_category(intval(get_query_var('cat')));
     15       $desc = $cat->cat_description;
     16       print $desc;
     17} else { ?><?php bloginfo_rss('description') ?><?php } ?></description>
    1318        <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
    1419        <docs>http://backend.userland.com/rss092</docs>
    1520        <language><?php echo get_option('rss_language'); ?></language>
  • wp-includes/feed-rdf.php

     
    1717<channel rdf:about="<?php bloginfo_rss("url") ?>">
    1818        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    1919        <link><?php bloginfo_rss('url') ?></link>
    20         <description><?php bloginfo_rss('description') ?></description>
     20        <description><?php
     21if (get_query_var('cat')) {
     22       $cat = get_category(intval(get_query_var('cat')));
     23       $desc = $cat->cat_description;
     24       print $desc;
     25} else { ?><?php bloginfo_rss("description"); ?><?php } ?></description>
    2126        <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
    2227        <admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
    2328        <sy:updatePeriod>hourly</sy:updatePeriod>