WordPress.org

Make WordPress Core

Changeset 2384


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

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-feed.php

    r2272 r2384  
    2929        require('wp-rss2.php');
    3030        break;
     31    case 'comments-rss2':
     32        require('wp-commentsrss2.php');
     33        break;
    3134    }
    3235}
  • 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;
  • trunk/wp-includes/template-functions-links.php

    r2355 r2384  
    169169    } else {
    170170        if ( false !== strpos($feed, 'comments_') )
    171             $feed = str_replace('comments_', 'comments', $feed);
    172 
    173         $output = get_settings('siteurl') . "/wp-{$feed}.php";
     171            $feed = str_replace('comments_', 'comments-', $feed);
     172
     173        $output = get_settings('home') . "/?feed={$feed}";
    174174    }
    175175
Note: See TracChangeset for help on using the changeset viewer.