| 4 | | |
| 5 | | {{{ |
| 6 | | <?php |
| 7 | | |
| 8 | | if (empty($feed)) { |
| 9 | | $blog = 1; |
| 10 | | $feed = 'atom'; |
| 11 | | $doing_rss = 1; |
| 12 | | require('wp-blog-header.php'); |
| 13 | | } |
| 14 | | |
| 15 | | header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true); |
| 16 | | $more = 1; |
| 17 | | |
| 18 | | ?> |
| 19 | | <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?> |
| 20 | | <feed |
| 21 | | xmlns="http://www.w3.org/2005/Atom" |
| 22 | | xmlns:dc="http://purl.org/dc/elements/1.1/" |
| 23 | | xml:lang="<?php echo get_option('rss_language'); ?>" |
| 24 | | > |
| 25 | | <title><?php bloginfo_rss('name') ?></title> |
| 26 | | <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> |
| 27 | | <link rel="self" type="application/atom+xml" href="<?php bloginfo('atom_url') ?>" /> |
| 28 | | <subtitle><?php bloginfo_rss("description") ?></subtitle> |
| 29 | | <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated> |
| 30 | | <rights>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></rights> |
| 31 | | <id><?php bloginfo('url') ?></id> |
| 32 | | <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> |
| 33 | | |
| 34 | | <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> |
| 35 | | <entry> |
| 36 | | <author> |
| 37 | | <name><?php the_author() ?></name> |
| 38 | | </author> |
| 39 | | <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_title_rss() ?>]]></div></title> |
| 40 | | <link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" /> |
| 41 | | <id><?php the_guid(); ?></id> |
| 42 | | <updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated> |
| 43 | | <?php the_category_rss('rdf') ?> |
| 44 | | <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_excerpt_rss(); ?>]]></div></summary> |
| 45 | | <?php if ( !get_settings('rss_use_excerpt') ) : ?> |
| 46 | | <content type="xhtml" xml:base="<?php permalink_single_rss() ?>"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_content('', 0, '') ?>]]></div></content> |
| 47 | | <?php endif; ?> |
| 48 | | <?php rss_enclosure(); ?> |
| 49 | | </entry> |
| 50 | | <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?> |
| 51 | | </feed> |
| 52 | | }}} |