[533] | 1 | <?php |
---|
[1235] | 2 | if (!isset($feed)) { |
---|
[836] | 3 | $blog = 1; |
---|
| 4 | $doing_rss = 1; |
---|
| 5 | require('wp-blog-header.php'); |
---|
| 6 | } |
---|
[1145] | 7 | $more = 1; |
---|
[1098] | 8 | $charset = get_settings('blog_charset'); |
---|
| 9 | if (!$charset) $charset = 'UTF-8'; |
---|
[1145] | 10 | header('Content-type: text/xml', true); |
---|
[533] | 11 | |
---|
| 12 | ?> |
---|
[1098] | 13 | <?php echo '<?xml version="1.0" encoding="' . $charset . '"?'.'>'; ?> |
---|
| 14 | |
---|
[628] | 15 | <!-- generator="wordpress/<?php echo $wp_version ?>" --> |
---|
[533] | 16 | <rss version="2.0" |
---|
| 17 | xmlns:content="http://purl.org/rss/1.0/modules/content/"> |
---|
| 18 | |
---|
| 19 | <channel> |
---|
[624] | 20 | <title><?php bloginfo_rss('name') ?></title> |
---|
| 21 | <link><?php bloginfo_rss('url') ?></link> |
---|
[533] | 22 | <description><?php bloginfo_rss("description") ?></description> |
---|
| 23 | <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate()); ?></copyright> |
---|
[1041] | 24 | <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT')); ?></pubDate> |
---|
[742] | 25 | <generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator> |
---|
[533] | 26 | |
---|
[628] | 27 | <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> |
---|
[533] | 28 | <item> |
---|
| 29 | <title><?php the_title_rss() ?></title> |
---|
| 30 | <link><?php permalink_single_rss() ?></link> |
---|
| 31 | <comments><?php comments_link(); ?></comments> |
---|
[1041] | 32 | <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', $post->post_date_gmt); ?></pubDate> |
---|
[624] | 33 | <?php the_category_rss() ?> |
---|
[1112] | 34 | <guid><?php the_permalink($id); ?></guid> |
---|
[1145] | 35 | <?php if (get_settings('rss_use_excerpt')) : ?> |
---|
[956] | 36 | <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description> |
---|
[1145] | 37 | <?php else : ?> |
---|
[1223] | 38 | <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description> |
---|
[533] | 39 | <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded> |
---|
[1145] | 40 | <?php endif; ?> |
---|
| 41 | |
---|
[533] | 42 | </item> |
---|
[956] | 43 | <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?> |
---|
[533] | 44 | </channel> |
---|
| 45 | </rss> |
---|