WordPress.org

Make WordPress Core

Ticket #7564: link-template.diff

File link-template.diff, 1.0 KB (added by Latz, 10 years ago)
  • link-template.php

     
    327327                $feed = get_default_feed();
    328328
    329329        if ( '' == $permalink_structure ) {
    330                 $link = get_option('home') . '?feed=rss2&author=' . $author_id;
     330                $link = get_option('home') . "?feed=$feed&author=" . $author_id;
    331331        } else {
    332332                $link = get_author_posts_url($author_id);
    333                 $link = trailingslashit($link) . user_trailingslashit('feed', 'feed');
     333                if( $feed == get_default_feed() )
     334                        $feed_link = 'feed';
     335                else
     336                        $feed_link = "feed/$feed";
     337                $link = trailingslashit($link) . user_trailingslashit($feed_link, 'feed');
    334338        }
    335339
    336         $link = apply_filters('author_feed_link', $link);
     340        $link = apply_filters('author_feed_link', $link,$feed);
    337341
    338342        return $link;
    339343}
    340 
    341344/** get_category_feed_link() - Get the feed link for a given category
    342345 *
    343346 * Returns a link to the feed for all post in a given category.  A specific feed can be requested