mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Fix id, self link and alternate link in Atom comment feeds. Props ionfish. fixes #5435
git-svn-id: http://svn.automattic.com/wordpress/trunk@6414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
22fc69ea24
commit
34780230f9
@ -19,10 +19,16 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
|
|||||||
|
|
||||||
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated>
|
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated>
|
||||||
<?php the_generator( 'atom' ); ?>
|
<?php the_generator( 'atom' ); ?>
|
||||||
|
|
||||||
|
<?php if ( is_singular() ) { ?>
|
||||||
|
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link() ?>" />
|
||||||
|
<link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
|
||||||
|
<id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
|
||||||
|
<?php } else { ?>
|
||||||
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
|
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
|
||||||
<link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
|
<link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
|
||||||
<id><?php bloginfo_rss('comments_atom_url'); ?></id>
|
<id><?php bloginfo_rss('comments_atom_url'); ?></id>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( have_comments() ) : while ( have_comments() ) : the_comment();
|
if ( have_comments() ) : while ( have_comments() ) : the_comment();
|
||||||
|
Loading…
Reference in New Issue
Block a user