mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user