Make WordPress Core


Ignore:
Timestamp:
12/15/2005 10:20:06 PM (19 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-commentsrss2.php

    r3196 r3314  
    2121        $i++;
    2222?>
    23     <title><?php if (is_single() || is_page()) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title>
     23    <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>
    2424    <link><?php (is_single()) ? permalink_single_rss() : bloginfo_rss("url") ?></link>
    2525    <description><?php bloginfo_rss("description") ?></description>
     
    5252?>
    5353    <item>
    54         <title>by: <?php comment_author_rss() ?></title>
     54        <title><?php if ( ! (is_single() || is_page()) ) {
     55            $title = get_the_title($comment->comment_post_ID);
     56            $title = apply_filters('the_title', $title);
     57            $title = apply_filters('the_title_rss', $title);
     58            printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss());
     59        } else {   
     60            printf(__('by: %s'), get_comment_author_rss());         
     61        } ?></title>
    5562        <link><?php comment_link() ?></link>
    5663        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
     
    5966            if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
    6067            ?>
    61         <description>Protected Comments: Please enter your password to view comments.</description>
     68        <description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
    6269        <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
    6370            <?php
Note: See TracChangeset for help on using the changeset viewer.