Add get_post_comments_feed_link() and have popup comments templates use it.
git-svn-id: https://develop.svn.wordpress.org/trunk@4929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6c6458f7c9
commit
27ee037027
|
@ -21,7 +21,7 @@ while( have_posts()) : the_post();
|
||||||
|
|
||||||
<h2 id="comments"><?php _e("Comments"); ?></h2>
|
<h2 id="comments"><?php _e("Comments"); ?></h2>
|
||||||
|
|
||||||
<p><a href="<?php echo get_option('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><?php _e("<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."); ?></a></p>
|
<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><?php _e("<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."); ?></a></p>
|
||||||
|
|
||||||
<?php if ('open' == $post->ping_status) { ?>
|
<?php if ('open' == $post->ping_status) { ?>
|
||||||
<p><?php _e("The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is:"); ?> <em><?php trackback_url() ?></em></p>
|
<p><?php _e("The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is:"); ?> <em><?php trackback_url() ?></em></p>
|
||||||
|
|
|
@ -21,7 +21,7 @@ while ( have_posts()) : the_post();
|
||||||
|
|
||||||
<h2 id="comments">Comments</h2>
|
<h2 id="comments">Comments</h2>
|
||||||
|
|
||||||
<p><a href="<?php echo get_option('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
|
<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
|
||||||
|
|
||||||
<?php if ('open' == $post->ping_status) { ?>
|
<?php if ('open' == $post->ping_status) { ?>
|
||||||
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
||||||
|
|
|
@ -89,21 +89,14 @@ function comment_text_rss() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '') {
|
function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = 'nolongerused') {
|
||||||
$url = comments_rss($commentsrssfilename);
|
$url = get_post_comments_feed_link();;
|
||||||
echo "<a href='$url'>$link_text</a>";
|
echo "<a href='$url'>$link_text</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function comments_rss($commentsrssfilename = '') {
|
function comments_rss($commentsrssfilename = 'nolongerused') {
|
||||||
global $id;
|
return get_post_comments_feed_link();
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,24 @@ function get_feed_link($feed='rss2') {
|
||||||
return apply_filters('feed_link', $output, $feed);
|
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 = '') {
|
function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
||||||
global $post;
|
global $post;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue