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