Make WordPress Core


Ignore:
Timestamp:
02/26/2005 06:12:16 AM (20 years ago)
Author:
ryan
Message:

Use index.php for feed links instead of wp-*.php http://mosquito.wordpress.org/view.php?id=915

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/feed-functions.php

    r2380 r2384  
    7474}
    7575
    76 function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = 'wp-commentsrss2.php') {
     76function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '') {
    7777    $url = comments_rss($commentsrssfilename);
    7878    echo "<a href='$url'>$link_text</a>";
    7979}
    8080
    81 function comments_rss($commentsrssfilename = 'wp-commentsrss2.php') {
     81function comments_rss($commentsrssfilename = '') {
    8282    global $id;
    8383
     
    8585        $url = trailingslashit( get_permalink() ) . 'feed/';
    8686    else
    87         $url = get_settings('siteurl') . "/$commentsrssfilename?p=$id";
     87        $url = get_settings('home') . "/$commentsrssfilename?feed=rss2&amp;p=$id";
    8888
    89     return $url;
     89    return apply_filters('post_comments_feed_link', $url);
    9090}
    9191
     
    9595
    9696       if ('' == $permalink_structure) {
    97            $file = get_settings('siteurl') . '/wp-rss2.php';
    98            $link = $file . '?author=' . $author_id;
     97                 $link = get_settings('home') . '?feed=rss2&amp;author=' . $author_id;
    9998       } else {
    100           $link = get_author_link(0, $author_id, $author_nicename);
    101           $link = $link . "feed/";
     99                $link = get_author_link(0, $author_id, $author_nicename);
     100                $link = $link . "feed/";
    102101       }
     102             
     103             $link = apply_filters('author_feed_link', $link);
    103104
    104105       if ($echo) echo $link;
     
    111112
    112113       if ('' == $permalink_structure) {
    113                $file = get_settings('siteurl') . '/wp-rss2.php';
    114         $link = $file . '?cat=' . $category_id;
     114                 $link = get_settings('home') . '?feed=rss2&amp;cat=' . $category_id;
    115115       } else {
    116         $link = get_category_link($category_id);
    117               $link = $link . "feed/";
     116                $link = get_category_link($category_id);
     117                $link = $link . "feed/";
    118118       }
     119
     120             $link = apply_filters('category_feed_link', $link);
    119121
    120122       if ($echo) echo $link;
Note: See TracChangeset for help on using the changeset viewer.