Make WordPress Core


Ignore:
Timestamp:
02/23/2007 08:31:07 AM (18 years ago)
Author:
ryan
Message:

Add get_post_comments_feed_link() and have popup comments templates use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r4886 r4929  
    248248}
    249249
     250function get_post_comments_feed_link($post_id = '', $feed = 'rss2') {
     251    global $id;
     252
     253    if ( empty($post_id) )
     254        $post_id = $id;
     255
     256    if ( '' != get_option('permalink_structure') ) {
     257        $url = trailingslashit( get_permalink() ) . 'feed';
     258        if ( 'rss2' != $feed )
     259            $url .= "/$feed";
     260        $url = user_trailingslashit($url);
     261    } else {
     262        $url = get_option('home') . "/?feed=$feed&p=$id";
     263    }
     264
     265    return apply_filters('post_comments_feed_link', $url); 
     266}
     267
    250268function edit_post_link($link = 'Edit This', $before = '', $after = '') {
    251269    global $post;
Note: See TracChangeset for help on using the changeset viewer.