Ticket #2067: wp-commentsrss2.php.diff

File wp-commentsrss2.php.diff, 0.8 kB (added by tinyau, 3 years ago)

Patch to include post title in comment feed

  • wp-commentsrss2.php

    old new  
    5151                                get_post_custom($comment->comment_post_ID); 
    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                        echo "Comment on $title"; 
     59                } ?> by: <?php comment_author_rss() ?></title> 
    5560                <link><?php comment_link() ?></link> 
    5661                <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate> 
    5762                <guid><?php comment_link() ?></guid>