4 require_once('wp-config.php');
8 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
12 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
14 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
16 xmlns:content="http://purl.org/rss/1.0/modules/content/"
17 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
18 xmlns:dc="http://purl.org/dc/elements/1.1/"
19 <?php do_action('rss2_ns'); ?>
23 <title><?php bloginfo_rss('name'); ?></title>
24 <link><?php bloginfo_rss('url') ?></link>
25 <description><?php bloginfo_rss("description") ?></description>
26 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
27 <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
28 <language><?php echo get_option('rss_language'); ?></language>
29 <?php do_action('rss2_head'); ?>
30 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
32 <title><?php the_title_rss() ?></title>
33 <link><?php permalink_single_rss() ?></link>
34 <comments><?php comments_link(); ?></comments>
35 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
36 <dc:creator><?php the_author() ?></dc:creator>
37 <?php the_category_rss() ?>
39 <guid isPermaLink="false"><?php the_guid(); ?></guid>
40 <?php if (get_settings('rss_use_excerpt')) : ?>
41 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
43 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
44 <?php if ( strlen( $post->post_content ) > 0 ) : ?>
45 <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
47 <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
50 <wfw:commentRss><?php echo comments_rss(); ?></wfw:commentRss>
51 <?php rss_enclosure(); ?>
52 <?php do_action('rss2_item'); ?>
54 <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>