2004-02-05 16:17:32 -05:00
|
|
|
<?php
|
|
|
|
|
2004-11-26 23:47:54 -05:00
|
|
|
if (empty($doing_rss)) {
|
2004-05-31 19:35:32 -04:00
|
|
|
$doing_rss = 1;
|
2005-03-29 10:05:19 -05:00
|
|
|
require(dirname(__FILE__) . '/wp-blog-header.php');
|
2004-05-31 19:35:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the pad, if present.
|
|
|
|
$feed = preg_replace('/^_+/', '', $feed);
|
2004-02-05 16:17:32 -05:00
|
|
|
|
2004-02-06 02:53:00 -05:00
|
|
|
if ($feed == '' || $feed == 'feed') {
|
2004-02-05 16:17:32 -05:00
|
|
|
$feed = 'rss2';
|
|
|
|
}
|
|
|
|
|
2004-09-18 18:47:43 -04:00
|
|
|
if ( is_single() || ($withcomments == 1) ) {
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-commentsrss2.php');
|
2004-02-05 16:17:32 -05:00
|
|
|
} else {
|
|
|
|
switch ($feed) {
|
|
|
|
case 'atom':
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-atom.php');
|
2004-02-05 16:17:32 -05:00
|
|
|
break;
|
|
|
|
case 'rdf':
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-rdf.php');
|
2004-02-05 16:17:32 -05:00
|
|
|
break;
|
|
|
|
case 'rss':
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-rss.php');
|
2004-02-05 16:17:32 -05:00
|
|
|
break;
|
|
|
|
case 'rss2':
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-rss2.php');
|
2004-02-05 16:17:32 -05:00
|
|
|
break;
|
2005-02-26 01:12:16 -05:00
|
|
|
case 'comments-rss2':
|
2005-03-29 10:05:19 -05:00
|
|
|
require(ABSPATH . 'wp-commentsrss2.php');
|
2005-02-26 01:12:16 -05:00
|
|
|
break;
|
2004-02-05 16:17:32 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|