1 <?php2 if (empty($feed)) {3 	$blog = 1;4 	$feed = 'rss2';5 	$doing_rss = 1;6 	require('wp-blog-header.php');7 }8 header('Content-type: application/xml; charset=' . get_settings('blog_charset'), true);9 $more = 1;10 ?>11 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>12 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->13 <rss version="2.0" 14 	xmlns:content="http://purl.org/rss/1.0/modules/content/"15 	xmlns:wfw="http://wellformedweb.org/CommentAPI/"16 	xmlns:dc="http://purl.org/dc/elements/1.1/"17 >18 <channel>19 	<title><?php bloginfo_rss('name'); ?></title>20 	<link><?php bloginfo_rss('url') ?></link>21 	<description><?php bloginfo_rss("description") ?></description>22 	<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></pubDate>23 	<generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>24 	<language><?php echo get_option('rss_language'); ?></language>25 	<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>26 	<item>27 		<title><?php the_title_rss() ?></title>28 		<link><?php permalink_single_rss() ?></link>29 		<comments><?php comments_link(); ?></comments>30 		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_the_time('Y-m-d H:i:s')); ?></pubDate>31 		<dc:creator><?php the_author() ?></dc:creator>32 		<?php the_category_rss() ?>33 		<guid><?php the_permalink($id); ?></guid>34 <?php if (get_settings('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('', 0, '') ?>]]></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 	</item>47 	<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>48 </channel>49 </rss> 