Make WordPress Core


Ignore:
Timestamp:
02/24/2007 07:33:29 AM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r4928 r4934  
    940940
    941941function do_feed() {
     942    global $wp_query;
     943
    942944    $feed = get_query_var('feed');
    943945
     
    946948
    947949    if ( $feed == '' || $feed == 'feed' )
    948         $feed = 'rss2';
    949    
    950     $for_comments = false;
    951 
    952     if ( is_singular() || get_query_var('withcomments') == 1 )
    953         $for_comments = true;
    954 
    955      if ( false !== strpos($feed, 'comments-') ) {
    956         $for_comments = true;
    957         $feed = str_replace('comments-', '', $feed);
    958      }
    959 
    960      if ( get_query_var('withoutcomments') == 1 )
    961         $for_comments = false;
     950        $feed = 'rss2';
    962951
    963952    $hook = 'do_feed_' . $feed;
    964     do_action($hook, $for_comments);
     953    do_action($hook, $wp_query->is_comment_feed);
    965954}
    966955
Note: See TracChangeset for help on using the changeset viewer.