Add atom:self link to rss2 feeds per RSS Best Practices Profile. Fixes #5205 props lexhair and rubys.
git-svn-id: https://develop.svn.wordpress.org/trunk@6278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
042d55e81d
commit
c9039f96d1
@ -6,6 +6,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
<rss version="2.0"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
>
|
||||
<channel>
|
||||
<title><?php
|
||||
@ -16,6 +17,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
else
|
||||
printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
|
||||
?></title>
|
||||
<atom:link href="<?php bloginfo('comments_rss2_url') ?>" rel="self" type="application/rss+xml" />
|
||||
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<pubDate><?php echo gmdate('r'); ?></pubDate>
|
||||
|
@ -9,11 +9,13 @@ $more = 1;
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
<?php do_action('rss2_ns'); ?>
|
||||
>
|
||||
|
||||
<channel>
|
||||
<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
|
||||
<atom:link href="<?php bloginfo('rss2_url') ?>" rel="self" type="application/rss+xml" />
|
||||
<link><?php bloginfo_rss('url') ?></link>
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
|
||||
|
Loading…
Reference in New Issue
Block a user