Comment feeds everywhere. Props mdawaffe and rob1n. fixes #2485

git-svn-id: https://develop.svn.wordpress.org/trunk@4934 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-02-24 07:33:29 +00:00
parent 6b2b9f27d1
commit 2f191b4b56
6 changed files with 168 additions and 117 deletions
+4 -15
View File
@@ -939,29 +939,18 @@ function bool_from_yn($yn) {
}
function do_feed() {
global $wp_query;
$feed = get_query_var('feed');
// Remove the pad, if present.
$feed = preg_replace('/^_+/', '', $feed);
if ( $feed == '' || $feed == 'feed' )
$feed = 'rss2';
$for_comments = false;
if ( is_singular() || get_query_var('withcomments') == 1 )
$for_comments = true;
if ( false !== strpos($feed, 'comments-') ) {
$for_comments = true;
$feed = str_replace('comments-', '', $feed);
}
if ( get_query_var('withoutcomments') == 1 )
$for_comments = false;
$feed = 'rss2';
$hook = 'do_feed_' . $feed;
do_action($hook, $for_comments);
do_action($hook, $wp_query->is_comment_feed);
}
function do_feed_rdf() {