| 1 | 1 <?php
|
|---|
| 2 | 2 if (empty($feed)) {
|
|---|
| 3 | 3 $blog = 1;
|
|---|
| 4 | 4 $feed = 'rss2';
|
|---|
| 5 | 5 $doing_rss = 1;
|
|---|
| 6 | 6 require('wp-blog-header.php');
|
|---|
| 7 | 7 }
|
|---|
| 8 |
|
|---|
| 9 | 8 header('Content-type: application/xml; charset=' . get_settings('blog_charset'), true);
|
|---|
| 10 | 9 $more = 1;
|
|---|
| 11 |
|
|---|
| 12 | 10 ?>
|
|---|
| 13 | 11 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
|---|
| 14 |
|
|---|
| 15 | 12 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
|
|---|
| 16 | 13 <rss version="2.0"
|
|---|
| 17 | 14 xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
|---|
| 18 | 15 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
|---|
| 19 | 16 xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|---|
| 20 | 17 >
|
|---|
| 21 |
|
|---|
| 22 | 18 <channel>
|
|---|
| 23 | 19 <title><?php bloginfo_rss('name'); ?></title>
|
|---|
| 24 | 20 <link><?php bloginfo_rss('url') ?></link>
|
|---|
| 25 | 21 <description><?php bloginfo_rss("description") ?></description>
|
|---|
| 26 | 22 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></pubDate>
|
|---|
| 27 | 23 <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
|
|---|
| 28 | 24 <language><?php echo get_option('rss_language'); ?></language>
|
|---|
| 29 |
|
|---|
| 30 | 25 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
|
|---|
| 31 | 26 <item>
|
|---|
| 32 | 27 <title><?php the_title_rss() ?></title>
|
|---|
| 33 | 28 <link><?php permalink_single_rss() ?></link>
|
|---|
| 34 | 29 <comments><?php comments_link(); ?></comments>
|
|---|
| 35 | 30 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_the_time('Y-m-d H:i:s')); ?></pubDate>
|
|---|
| 36 | 31 <dc:creator><?php the_author() ?></dc:creator>
|
|---|
| 37 | 32 <?php the_category_rss() ?>
|
|---|
| 38 |
|
|---|
| 39 | 33 <guid><?php the_permalink($id); ?></guid>
|
|---|
| 40 | 34 <?php if (get_settings('rss_use_excerpt')) : ?>
|
|---|
| 41 | 35 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
|---|
| 42 | 36 <?php else : ?>
|
|---|
| 43 | 37 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
|---|
| 44 | 38 <?php if ( strlen( $post->post_content ) > 0 ) : ?>
|
|---|
| 45 | 39 <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
|---|
| 46 | 40 <?php else : ?>
|
|---|
| 47 | 41 <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
|
|---|
| 48 | 42 <?php endif; ?>
|
|---|
| 49 | 43 <?php endif; ?>
|
|---|
| 50 | 44 <wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
|
|---|
| 51 | 45 <?php rss_enclosure(); ?>
|
|---|
| 52 | 46 </item>
|
|---|
| 53 | 47 <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
|---|
| 54 | 48 </channel>
|
|---|
| 55 | 49 </rss>
|
|---|
| 56 |
|
|---|