Make WordPress Core

Ticket #5238: self-link.diff

File self-link.diff, 1.8 KB (added by andy, 18 years ago)
  • wp-includes/feed-rss2.php

     
    1515
    1616<channel>
    1717        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    18         <atom:link href="<?php bloginfo('rss2_url') ?>" rel="self" type="application/rss+xml" />
     18        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    1919        <link><?php bloginfo_rss('url') ?></link>
    2020        <description><?php bloginfo_rss("description") ?></description>
    2121        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
  • wp-includes/feed-rss2-comments.php

     
    1717                else
    1818                        printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
    1919        ?></title>
    20         <atom:link href="<?php bloginfo('comments_rss2_url') ?>" rel="self" type="application/rss+xml" />
     20        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    2121        <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
    2222        <description><?php bloginfo_rss("description") ?></description>
    2323        <pubDate><?php echo gmdate('r'); ?></pubDate>
  • wp-includes/feed.php

     
    220220        }
    221221}
    222222
     223function self_link() {
     224        echo 'http'
     225                . ( $_SERVER['https'] == 'on' ? 's' : '' ) . '://'
     226                . $_SERVER['HTTP_HOST']
     227                . wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1);
     228}
     229
    223230?>