2004-02-05 16:17:32 -05:00
|
|
|
<?php
|
|
|
|
|
2004-05-31 19:35:32 -04:00
|
|
|
if (! $doing_rss) {
|
|
|
|
$doing_rss = 1;
|
|
|
|
require('wp-blog-header.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
// TODO: Get default feed from options DB.
|
|
|
|
$feed = 'rss2';
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( (($p != '') && ($p != 'all')) || ($name != '') || ($withcomments == 1) ) {
|
|
|
|
require('wp-commentsrss2.php');
|
|
|
|
} else {
|
|
|
|
switch ($feed) {
|
|
|
|
case 'atom':
|
|
|
|
require('wp-atom.php');
|
|
|
|
break;
|
|
|
|
case 'rdf':
|
|
|
|
require('wp-rdf.php');
|
|
|
|
break;
|
|
|
|
case 'rss':
|
|
|
|
require('wp-rss.php');
|
|
|
|
break;
|
|
|
|
case 'rss2':
|
|
|
|
require('wp-rss2.php');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|