Projects : mp-wp : mp-wp_genesis

mp-wp/wp-includes/feed-rss2.php

Dir - Raw

1<?php
2/**
3 * RSS2 Feed Template for displaying RSS2 Posts feed.
4 *
5 * @package WordPress
6 */
7
8// Brand feeds of unexcluded parsers.
9
10$excluded_parsers = array ("65.19.138.34" => 1, "69.162.64.82" => 1);
11$time = time()-1420000000;
12if ($excluded_parsers[$_SERVER['REMOTE_ADDR']] < 1) $feed_brand = base64_encode(mt_rand(10,99).$time."|".$_SERVER['REMOTE_ADDR']);
13
14
15header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
16$more = 1;
17
18?>
19<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
20
21<rss version="2.0"
22 xmlns:content="http://purl.org/rss/1.0/modules/content/"
23 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
24 xmlns:dc="http://purl.org/dc/elements/1.1/"
25 xmlns:atom="http://www.w3.org/2005/Atom"
26 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
27 <?php do_action('rss2_ns'); ?>
28>
29
30<channel>
31 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
32 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
33 <link><?php bloginfo_rss('url') ?></link>
34 <description><?php bloginfo_rss("description") ?></description>
35 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
36 <?php the_generator( 'rss2' ); ?>
37 <language><?php echo get_option('rss_language'); ?></language>
38 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
39 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
40 <?php do_action('rss2_head'); ?>
41 <?php while( have_posts()) : the_post(); ?>
42 <item>
43 <title><?php the_title_rss() ?></title>
44 <link><?php the_permalink_rss() ?></link>
45 <comments><?php comments_link(); ?></comments>
46 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
47 <dc:creator><?php the_author() ?></dc:creator>
48 <?php the_category_rss() ?>
49
50 <guid isPermaLink="false"><?php the_guid(); ?></guid>
51<?php if (get_option('rss_use_excerpt')) : ?>
52 <description><![CDATA[<?php echo $feed_brand; the_excerpt_rss() ?>]]></description>
53<?php else : ?>
54 <description><![CDATA[<?php echo $feed_brand; the_excerpt_rss() ?>]]></description>
55 <?php if ( strlen( $post->post_content ) > 0 ) : ?>
56 <content:encoded><![CDATA[<?php echo $feed_brand; the_excerpt_rss() ?>]]></content:encoded>
57 <?php else : ?>
58 <content:encoded><![CDATA[<?php echo $feed_brand; the_excerpt_rss() ?>]]></content:encoded>
59 <?php endif; ?>
60<?php endif; ?>
61 <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss>
62<?php rss_enclosure(); ?>
63 <?php do_action('rss2_item'); ?>
64 </item>
65 <?php endwhile; ?>
66</channel>
67</rss>