WordPress.org

Make WordPress Core

Changeset 5919


Ignore:
Timestamp:
08/22/2007 10:42:57 PM (12 years ago)
Author:
ryan
Message:

Fix get_post_comments_feed_link() to work with pages. fixes #4637

File:
1 edited

Legend:

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

    r5726 r5919  
    261261
    262262    if ( '' != get_option('permalink_structure') ) {
    263         $url = trailingslashit( get_permalink() ) . 'feed';
     263        $url = trailingslashit( get_permalink($post_id) ) . 'feed';
    264264        if ( 'rss2' != $feed )
    265265            $url .= "/$feed";
    266266        $url = user_trailingslashit($url, 'single_feed');
    267267    } else {
    268         $url = get_option('home') . "/?feed=$feed&p=$id";
     268        $type = get_post_field('post_type', $post_id);
     269        if ( 'page' == $type )
     270            $url = get_option('home') . "/?feed=$feed&page_id=$post_id";
     271        else
     272            $url = get_option('home') . "/?feed=$feed&p=$post_id";
    269273    }
    270274
Note: See TracChangeset for help on using the changeset viewer.