diff --git a/wp-content/themes/classic/comments-popup.php b/wp-content/themes/classic/comments-popup.php index 8c0ba251e6..bded9b4064 100644 --- a/wp-content/themes/classic/comments-popup.php +++ b/wp-content/themes/classic/comments-popup.php @@ -21,7 +21,7 @@ while( have_posts()) : the_post();
-RSS feed for comments on this post."); ?>
+RSS feed for comments on this post."); ?>
ping_status) { ?>URL to TrackBack this entry is:"); ?>
diff --git a/wp-content/themes/default/comments-popup.php b/wp-content/themes/default/comments-popup.php index 04dba338fe..9ad28b5e0f 100644 --- a/wp-content/themes/default/comments-popup.php +++ b/wp-content/themes/default/comments-popup.php @@ -21,7 +21,7 @@ while ( have_posts()) : the_post();RSS feed for comments on this post.
+RSS feed for comments on this post.
ping_status) { ?>The URL to TrackBack this entry is:
diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 04f54d9a87..abee911e48 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -89,21 +89,14 @@ function comment_text_rss() { } -function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '') { - $url = comments_rss($commentsrssfilename); +function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = 'nolongerused') { + $url = get_post_comments_feed_link();; echo "$link_text"; } -function comments_rss($commentsrssfilename = '') { - global $id; - - if ( '' != get_option('permalink_structure') ) - $url = trailingslashit( get_permalink() ) . user_trailingslashit('feed'); - else - $url = get_option('home') . "/$commentsrssfilename?feed=rss2&p=$id"; - - return apply_filters('post_comments_feed_link', $url); +function comments_rss($commentsrssfilename = 'nolongerused') { + return get_post_comments_feed_link(); } diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index f576129f8b..1f600ee716 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -247,6 +247,24 @@ function get_feed_link($feed='rss2') { return apply_filters('feed_link', $output, $feed); } +function get_post_comments_feed_link($post_id = '', $feed = 'rss2') { + global $id; + + if ( empty($post_id) ) + $post_id = $id; + + if ( '' != get_option('permalink_structure') ) { + $url = trailingslashit( get_permalink() ) . 'feed'; + if ( 'rss2' != $feed ) + $url .= "/$feed"; + $url = user_trailingslashit($url); + } else { + $url = get_option('home') . "/?feed=$feed&p=$id"; + } + + return apply_filters('post_comments_feed_link', $url); +} + function edit_post_link($link = 'Edit This', $before = '', $after = '') { global $post;