Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (32 sloc) 0.762 kB
c208cf8 Clean feed and trackback URLs.
rboren authored
1 <?php
2
39bf851 Perform empty() check on $doing_rss to avoid warning.
rboren authored
3 if (empty($doing_rss)) {
44e890f index.php now handles feeds and trackbacks.
rboren authored
4 $doing_rss = 1;
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
5 require(dirname(__FILE__) . '/wp-blog-header.php');
44e890f index.php now handles feeds and trackbacks.
rboren authored
6 }
7
8 // Remove the pad, if present.
9 $feed = preg_replace('/^_+/', '', $feed);
c208cf8 Clean feed and trackback URLs.
rboren authored
10
eae78fc use double == in expressions
alex_t_king authored
11 if ($feed == '' || $feed == 'feed') {
c208cf8 Clean feed and trackback URLs.
rboren authored
12 $feed = 'rss2';
13 }
14
75d9746 Trackback fix ups.
rboren authored
15 if ( is_single() || ($withcomments == 1) ) {
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
16 require(ABSPATH . 'wp-commentsrss2.php');
c208cf8 Clean feed and trackback URLs.
rboren authored
17 } else {
18 switch ($feed) {
19 case 'atom':
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
20 require(ABSPATH . 'wp-atom.php');
c208cf8 Clean feed and trackback URLs.
rboren authored
21 break;
22 case 'rdf':
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
23 require(ABSPATH . 'wp-rdf.php');
c208cf8 Clean feed and trackback URLs.
rboren authored
24 break;
25 case 'rss':
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
26 require(ABSPATH . 'wp-rss.php');
c208cf8 Clean feed and trackback URLs.
rboren authored
27 break;
28 case 'rss2':
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
29 require(ABSPATH . 'wp-rss2.php');
c208cf8 Clean feed and trackback URLs.
rboren authored
30 break;
8d57921 Use index.php for feed links instead of wp-*.php http://mosquito.word…
ryan authored
31 case 'comments-rss2':
7133584 USe absolute paths in require to avoid problems with wonky include pa…
ryan authored
32 require(ABSPATH . 'wp-commentsrss2.php');
8d57921 Use index.php for feed links instead of wp-*.php http://mosquito.word…
ryan authored
33 break;
c208cf8 Clean feed and trackback URLs.
rboren authored
34 }
35 }
36
37 ?>
Something went wrong with that request. Please try again.