]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/feed-rss2.php
Wordpress 2.3.2
[autoinstalls/wordpress.git] / wp-includes / feed-rss2.php
1 <?php
2 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
3 $more = 1;
4
5 ?>
6 <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
7
8 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
9 <rss version="2.0"
10         xmlns:content="http://purl.org/rss/1.0/modules/content/"
11         xmlns:wfw="http://wellformedweb.org/CommentAPI/"
12         xmlns:dc="http://purl.org/dc/elements/1.1/"
13         <?php do_action('rss2_ns'); ?>
14 >
15
16 <channel>
17         <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
18         <link><?php bloginfo_rss('url') ?></link>
19         <description><?php bloginfo_rss("description") ?></description>
20         <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
21         <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
22         <language><?php echo get_option('rss_language'); ?></language>
23         <?php do_action('rss2_head'); ?>
24         <?php while( have_posts()) : the_post(); ?>
25         <item>
26                 <title><?php the_title_rss() ?></title>
27                 <link><?php the_permalink_rss() ?></link>
28                 <comments><?php comments_link(); ?></comments>
29                 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
30                 <dc:creator><?php the_author() ?></dc:creator>
31                 <?php the_category_rss() ?>
32
33                 <guid isPermaLink="false"><?php the_guid(); ?></guid>
34 <?php if (get_option('rss_use_excerpt')) : ?>
35                 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
36 <?php else : ?>
37                 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
38         <?php if ( strlen( $post->post_content ) > 0 ) : ?>
39                 <content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>
40         <?php else : ?>
41                 <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
42         <?php endif; ?>
43 <?php endif; ?>
44                 <wfw:commentRss><?php echo comments_rss(); ?></wfw:commentRss>
45 <?php rss_enclosure(); ?>
46         <?php do_action('rss2_item'); ?>
47         </item>
48         <?php endwhile; ?>
49 </channel>
50 </rss>