get_post_custom($comment_post->ID); ?> <entry> <title><?php if ( !is_singular() ) { $title = get_the_title($comment_post->ID); $title = apply_filters('the_title_rss', $title); printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); } else { printf(ent2ncr(__('By: %s')), get_comment_author_rss()); } ?></title> <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" /> <author> <name><?php comment_author_rss(); ?></name> <?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?> </author> <id><?php comment_link(); ?></id> <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated> <published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published> <?php if ( post_password_required($comment_post) ) : ?> <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content> <?php else : // post pass ?> <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content> <?php endif; // post pass // Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt) if ( $comment->comment_parent == 0 ) : // This comment is top level ?> <thr:in-reply-to ref="<?php the_guid() ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
} else { printf(ent2ncr(__('By: %s')), get_comment_author_rss()); } ?> </title> <link rel="alternate" href="<?php comment_link(); ?> " type="<?php bloginfo_rss('html_type'); ?> " /> <author> <name><?php comment_author_rss(); ?> </name> <?php if (get_comment_author_url()) { echo '<uri>' . get_comment_author_url() . '</uri>'; } ?> </author> <id><?php comment_guid(); ?> </id> <updated><?php
AND post_date < '".date("Y-m-d H:i:59")."' ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') ); } else { // if no post id passed in, we'll just ue the last 10 comments. $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."' ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') ); } // this line is WordPress' motor, do not delete it. if ($comments) { foreach ($comments as $comment) { ?> <item> <title>by: <?php comment_author_rss() ?></title> <link><?php comment_link() ?></link> <pubDate><?php comment_time('r'); ?></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> <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded> <?php } else { ?> <description><?php comment_text_rss() ?></description> <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded> <?php } // close check for password