raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * RSS2 Feed Template for displaying RSS2 Comments feed.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 */
mp-wp_genesis 7
mp-wp_genesis 8 header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true);
mp-wp_genesis 9
mp-wp_genesis 10 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
mp-wp_genesis 11 ?>
mp-wp_genesis 12 <rss version="2.0"
mp-wp_genesis 13 xmlns:content="http://purl.org/rss/1.0/modules/content/"
mp-wp_genesis 14 xmlns:dc="http://purl.org/dc/elements/1.1/"
mp-wp_genesis 15 xmlns:atom="http://www.w3.org/2005/Atom"
mp-wp_genesis 16 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
mp-wp_genesis 17 >
mp-wp_genesis 18 <channel>
mp-wp_genesis 19 <title><?php
mp-wp_genesis 20 if ( is_singular() )
mp-wp_genesis 21 printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
mp-wp_genesis 22 elseif ( is_search() )
mp-wp_genesis 23 printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s']));
mp-wp_genesis 24 else
mp-wp_genesis 25 printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
mp-wp_genesis 26 ?></title>
mp-wp_genesis 27 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
mp-wp_genesis 28 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
mp-wp_genesis 29 <description><?php bloginfo_rss("description") ?></description>
mp-wp_genesis 30 <pubDate><?php echo gmdate('r'); ?></pubDate>
mp-wp_genesis 31 <?php the_generator( 'rss2' ); ?>
mp-wp_genesis 32 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
mp-wp_genesis 33 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
mp-wp_genesis 34 <?php do_action('commentsrss2_head'); ?>
mp-wp_genesis 35 <?php
mp-wp_genesis 36 if ( have_comments() ) : while ( have_comments() ) : the_comment();
mp-wp_genesis 37 $comment_post = get_post($comment->comment_post_ID);
mp-wp_genesis 38 get_post_custom($comment_post->ID);
mp-wp_genesis 39 ?>
mp-wp_genesis 40 <item>
mp-wp_genesis 41 <title><?php
mp-wp_genesis 42 if ( !is_singular() ) {
mp-wp_genesis 43 $title = get_the_title($comment_post->ID);
mp-wp_genesis 44 $title = apply_filters('the_title_rss', $title);
mp-wp_genesis 45 printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
mp-wp_genesis 46 } else {
mp-wp_genesis 47 printf(ent2ncr(__('By: %s')), get_comment_author_rss());
mp-wp_genesis 48 }
mp-wp_genesis 49 ?></title>
mp-wp_genesis 50 <link><?php comment_link() ?></link>
mp-wp_genesis 51 <dc:creator><?php echo get_comment_author_rss() ?></dc:creator>
mp-wp_genesis 52 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
mp-wp_genesis 53 <guid isPermaLink="false"><?php comment_guid() ?></guid>
mp-wp_genesis 54 <?php if ( post_password_required($comment_post) ) : ?>
mp-wp_genesis 55 <description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description>
mp-wp_genesis 56 <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
mp-wp_genesis 57 <?php else : // post pass ?>
mp-wp_genesis 58 <description><?php comment_text_rss() ?></description>
mp-wp_genesis 59 <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
mp-wp_genesis 60 <?php endif; // post pass
mp-wp_genesis 61 do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID);
mp-wp_genesis 62 ?>
mp-wp_genesis 63 </item>
mp-wp_genesis 64 <?php endwhile; endif; ?>
mp-wp_genesis 65 </channel>
mp-wp_genesis 66 </rss>