diff --git a/wp-includes/classes.php b/wp-includes/classes.php index c27b2fcbd5..f317151232 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -1,7 +1,7 @@ query_vars['withcomments'] ) + if ( $this->query_vars['withcomments'] + || ( !$this->query_vars['withoutcomments'] + && ( $this->query_vars['p'] + || $this->query_vars['name'] + || $this->query_vars['page_id'] + || $this->query_vars['pagename'] + || $this->query_vars['attachment'] + || $this->query_vars['attachment_id'] + ) + ) + ) $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT'; else $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ea37fbd321..d8d20ccc46 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -815,7 +815,7 @@ function do_feed() { $feed = 'rss2'; $for_comments = false; - if ( is_singular() || get_query_var('withcomments') == 1 || $feed == 'comments-rss2' ) { + if ( 1 != get_query_var('withoutcomments') && ( is_singular() || get_query_var('withcomments') == 1 || $feed == 'comments-rss2' ) ) { $feed = 'rss2'; $for_comments = true; }