mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 22:54:36 +00:00
Feeds: <comments> is optional in RSS2, so don't include it when comments aren't present or open. Same for <wfw:commentRss> and <slash:comments>
Adds unit test. Props swissspidy, realloc, hakre, sivel. Fixes #9134. git-svn-id: https://develop.svn.wordpress.org/trunk@35506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -78,10 +78,13 @@ do_action( 'rss_tag_pre', 'atom' );
|
||||
* @since 2.0.0
|
||||
*/
|
||||
do_action( 'atom_entry' );
|
||||
|
||||
if ( get_comments_number() || comments_open() ) :
|
||||
?>
|
||||
<link rel="replies" type="<?php bloginfo_rss('html_type'); ?>" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/>
|
||||
<link rel="replies" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link(0, 'atom') ); ?>" thr:count="<?php echo get_comments_number()?>"/>
|
||||
<thr:total><?php echo get_comments_number()?></thr:total>
|
||||
<?php endif; ?>
|
||||
</entry>
|
||||
<?php endwhile ; ?>
|
||||
</feed>
|
||||
|
||||
Reference in New Issue
Block a user