Add post titles to site comment feed. Add some gettext. fixes #2067 #1987

git-svn-id: http://svn.automattic.com/wordpress/trunk@3314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-15 22:20:06 +00:00
parent c676e9c5c0
commit ee7b572202
2 changed files with 20 additions and 7 deletions

View File

@ -20,7 +20,7 @@ if (have_posts()) :
if ($i < 1) {
$i++;
?>
<title><?php if (is_single() || is_page()) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title>
<title><?php if (is_single() || is_page() ) { printf(__('Comments on: %s'), get_the_title_rss()); } else { printf(__('Comments for %s'), get_bloginfo_rss("name")); } ?></title>
<link><?php (is_single()) ? permalink_single_rss() : bloginfo_rss("url") ?></link>
<description><?php bloginfo_rss("description") ?></description>
<pubDate><?php echo gmdate('r'); ?></pubDate>
@ -51,14 +51,21 @@ if (have_posts()) :
get_post_custom($comment->comment_post_ID);
?>
<item>
<title>by: <?php comment_author_rss() ?></title>
<title><?php if ( ! (is_single() || is_page()) ) {
$title = get_the_title($comment->comment_post_ID);
$title = apply_filters('the_title', $title);
$title = apply_filters('the_title_rss', $title);
printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss());
} else {
printf(__('by: %s'), get_comment_author_rss());
} ?></title>
<link><?php comment_link() ?></link>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
<guid><?php comment_link() ?></guid>
<?php
if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
?>
<description>Protected Comments: Please enter your password to view comments.</description>
<description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
<?php
} else {

View File

@ -9,11 +9,15 @@ function bloginfo_rss($show = '') {
echo get_bloginfo_rss($show);
}
function the_title_rss() {
function get_the_title_rss() {
$title = get_the_title();
$title = apply_filters('the_title', $title);
$title = apply_filters('the_title_rss', $title);
echo $title;
return $title;
}
function the_title_rss() {
echo get_the_title_rss();
}
function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
@ -62,9 +66,11 @@ function comment_link() {
echo get_comment_link();
}
function get_comment_author_rss() {
return apply_filters('comment_author_rss', get_comment_author() );
}
function comment_author_rss() {
$author = apply_filters('comment_author_rss', get_comment_author() );
echo $author;
echo get_comment_author_rss();
}
function comment_text_rss() {