WordPress.org

Make WordPress Core

Ticket #5205: rss_atom_link_patch.diff

File rss_atom_link_patch.diff, 1.6 KB (added by lexhair, 12 years ago)
  • feed-rss2-comments.php

     
    66<rss version="2.0"
    77        xmlns:content="http://purl.org/rss/1.0/modules/content/"
    88        xmlns:dc="http://purl.org/dc/elements/1.1/"
     9        xmlns:atom="http://www.w3.org/2005/Atom"
    910        >
    1011<channel>
    1112        <title><?php
     
    1617                else
    1718                        printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
    1819        ?></title>
     20        <atom:link href="<?php bloginfo('comments_rss2_url') ?>" rel="self" type="application/rss+xml" />
    1921        <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
    2022        <description><?php bloginfo_rss("description") ?></description>
    2123        <pubDate><?php echo gmdate('r'); ?></pubDate>
  • feed-rss2.php

     
    99        xmlns:content="http://purl.org/rss/1.0/modules/content/"
    1010        xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    1111        xmlns:dc="http://purl.org/dc/elements/1.1/"
     12        xmlns:atom="http://www.w3.org/2005/Atom"
    1213        <?php do_action('rss2_ns'); ?>
    1314>
    1415
    1516<channel>
    1617        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
     18        <atom:link href="<?php bloginfo('rss2_url') ?>" rel="self" type="application/rss+xml" />
    1719        <link><?php bloginfo_rss('url') ?></link>
    1820        <description><?php bloginfo_rss("description") ?></description>
    1921        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>