Ticket #9134: 9134.diff

File 9134.diff, 975 bytes (added by sivel, 4 years ago)
  • wp-includes/feed-rss2.php

     
    3535        <item> 
    3636                <title><?php the_title_rss() ?></title> 
    3737                <link><?php the_permalink_rss() ?></link> 
     38        <?php if ( get_comments_number($post->ID) ) : ?> 
    3839                <comments><?php comments_link(); ?></comments> 
     40        <?php endif; ?> 
    3941                <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> 
    4042                <dc:creator><?php the_author() ?></dc:creator> 
    4143                <?php the_category_rss() ?> 
     
    5153                <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded> 
    5254        <?php endif; ?> 
    5355<?php endif; ?> 
     56        <?php if ( get_comments_number($post->ID) ) : ?> 
    5457                <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss> 
     58        <?php endif; ?> 
    5559<?php rss_enclosure(); ?> 
    5660        <?php do_action('rss2_item'); ?> 
    5761        </item>