3 * Atom Feed Template for displaying Atom Posts feed.
8 header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
13 /** This action is documented in wp-includes/feed-rss2.php */
14 do_action( 'rss_tag_pre', 'atom' );
17 xmlns="http://www.w3.org/2005/Atom"
18 xmlns:thr="http://purl.org/syndication/thread/1.0"
19 xml:lang="<?php bloginfo_rss( 'language' ); ?>"
20 xml:base="<?php bloginfo_rss('url') ?>/wp-atom.php"
23 * Fires at end of the Atom feed root to add namespaces.
27 do_action( 'atom_ns' );
30 <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
31 <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
33 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
35 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('url') ?>" />
36 <id><?php bloginfo('atom_url'); ?></id>
37 <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />
41 * Fires just before the first Atom feed entry.
45 do_action( 'atom_head' );
47 while ( have_posts() ) : the_post();
51 <name><?php the_author() ?></name>
52 <?php $author_url = get_the_author_meta('url'); if ( !empty($author_url) ) : ?>
53 <uri><?php the_author_meta('url')?></uri>
57 * Fires at the end of each Atom feed author entry.
61 do_action( 'atom_author' );
64 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
65 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php the_permalink_rss() ?>" />
66 <id><?php the_guid() ; ?></id>
67 <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
68 <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
69 <?php the_category_rss('atom') ?>
70 <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
71 <?php if ( !get_option('rss_use_excerpt') ) : ?>
72 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><![CDATA[<?php the_content_feed('atom') ?>]]></content>
74 <?php atom_enclosure();
76 * Fires at the end of each Atom feed item.
80 do_action( 'atom_entry' );
82 <link rel="replies" type="<?php bloginfo_rss('html_type'); ?>" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/>
83 <link rel="replies" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link(0, 'atom') ); ?>" thr:count="<?php echo get_comments_number()?>"/>
84 <thr:total><?php echo get_comments_number()?></thr:total>