Comment feed fixes from David House. fixes #2570

git-svn-id: http://svn.automattic.com/wordpress/trunk@3644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-03-17 01:16:22 +00:00
parent 4b7d1d077d
commit 667597592c
3 changed files with 12 additions and 6 deletions

View File

@@ -2015,7 +2015,7 @@ function remove_query_arg($key, $query) {
function load_template($file) {
global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query,
$wp_rewrite, $wpdb, $wp_version, $wp;
$wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment;
extract($wp_query->query_vars);
@@ -2220,7 +2220,7 @@ function do_feed() {
$feed = 'rss2';
$for_comments = false;
if ( is_single() || ($withcomments == 1) ) {
if ( is_single() || (get_query_var('withcomments') == 1) ) {
$feed = 'rss2';
$for_comments = true;
}
@@ -2238,10 +2238,11 @@ function do_feed_rss() {
}
function do_feed_rss2($for_comments) {
if ( $for_comments )
if ( $for_comments ) {
load_template(ABSPATH . 'wp-commentsrss2.php');
else
} else {
load_template(ABSPATH . 'wp-rss2.php');
}
}
function do_feed_atom() {

View File

@@ -15,6 +15,10 @@ function the_ID() {
echo $id;
}
function get_the_ID() {
global $id;
return $id;
}
function the_title($before = '', $after = '', $echo = true) {
$title = get_the_title();