2004-02-05 22:17:32 +01:00
|
|
|
<?php
|
|
|
|
|
2004-11-27 05:47:54 +01:00
|
|
|
if (empty($doing_rss)) {
|
2004-06-01 01:35:32 +02:00
|
|
|
$doing_rss = 1;
|
|
|
|
require('wp-blog-header.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the pad, if present.
|
|
|
|
$feed = preg_replace('/^_+/', '', $feed);
|
2004-02-05 22:17:32 +01:00
|
|
|
|
2004-02-06 08:53:00 +01:00
|
|
|
if ($feed == '' || $feed == 'feed') {
|
2004-02-05 22:17:32 +01:00
|
|
|
$feed = 'rss2';
|
|
|
|
}
|
|
|
|
|
2004-09-19 00:47:43 +02:00
|
|
|
if ( is_single() || ($withcomments == 1) ) {
|
2004-02-05 22:17:32 +01:00
|
|
|
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;
|
2005-02-26 07:12:16 +01:00
|
|
|
case 'comments-rss2':
|
|
|
|
require('wp-commentsrss2.php');
|
|
|
|
break;
|
2004-02-05 22:17:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|