root/branches/2.0/wp-feed.php

Revision 2491, 0.7 kB (checked in by ryan, 3 years ago)

USe absolute paths in require to avoid problems with wonky include paths. http://mosquito.wordpress.org/view.php?id=1169 Props: roxeteer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2
3 if (empty($doing_rss)) {
4     $doing_rss = 1;
5     require(dirname(__FILE__) . '/wp-blog-header.php');
6 }
7
8 // Remove the pad, if present.
9 $feed = preg_replace('/^_+/', '', $feed);
10
11 if ($feed == '' || $feed == 'feed') {
12     $feed = 'rss2';
13 }
14
15 if ( is_single() || ($withcomments == 1) ) {
16     require(ABSPATH . 'wp-commentsrss2.php');
17 } else {
18     switch ($feed) {
19     case 'atom':
20         require(ABSPATH . 'wp-atom.php');
21         break;
22     case 'rdf':
23         require(ABSPATH . 'wp-rdf.php');
24         break;
25     case 'rss':
26         require(ABSPATH . 'wp-rss.php');
27         break;
28     case 'rss2':
29         require(ABSPATH . 'wp-rss2.php');
30         break;
31     case 'comments-rss2':
32         require(ABSPATH . 'wp-commentsrss2.php');
33         break;
34     }
35 }
36
37 ?>
38
Note: See TracBrowser for help on using the browser.