web/wp-includes/feed-atom.php
changeset 194 32102edaa81b
parent 136 bde1974c263b
child 204 09a1c134465b
equal deleted inserted replaced
193:2f6f6f7551ca 194:32102edaa81b
    10 
    10 
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
    12 <feed
    12 <feed
    13   xmlns="http://www.w3.org/2005/Atom"
    13   xmlns="http://www.w3.org/2005/Atom"
    14   xmlns:thr="http://purl.org/syndication/thread/1.0"
    14   xmlns:thr="http://purl.org/syndication/thread/1.0"
    15   xml:lang="<?php echo get_option('rss_language'); ?>"
    15   xml:lang="<?php bloginfo_rss( 'language' ); ?>"
    16   xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php"
    16   xml:base="<?php bloginfo_rss('url') ?>/wp-atom.php"
    17   <?php do_action('atom_ns'); ?>
    17   <?php do_action('atom_ns'); ?>
    18  >
    18  >
    19 	<title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    19 	<title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
    20 	<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
    20 	<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
    21 
    21 
    22 	<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
    22 	<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
    23 	<?php the_generator( 'atom' ); ?>
       
    24 
    23 
    25 	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
    24 	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" />
    26 	<id><?php bloginfo('atom_url'); ?></id>
    25 	<id><?php bloginfo('atom_url'); ?></id>
    27 	<link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />
    26 	<link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />
    28 
    27 
    29 	<?php do_action('atom_head'); ?>
    28 	<?php do_action('atom_head'); ?>
    30 	<?php while (have_posts()) : the_post(); ?>
    29 	<?php while (have_posts()) : the_post(); ?>
    31 	<entry>
    30 	<entry>
    32 		<author>
    31 		<author>
    33 			<name><?php the_author() ?></name>
    32 			<name><?php the_author() ?></name>
    34 			<?php $author_url = get_the_author_meta('url'); if ( !empty($author_url) ) : ?>
    33 			<?php $author_url = get_the_author_meta('url'); if ( !empty($author_url) ) : ?>
    35 			<uri><?php the_author_meta('url')?></uri>
    34 			<uri><?php the_author_meta('url')?></uri>
    36 			<?php endif; ?>
    35 			<?php endif;
       
    36 			do_action('atom_author'); ?>
    37 		</author>
    37 		</author>
    38 		<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
    38 		<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
    39 		<link rel="alternate" type="text/html" href="<?php the_permalink_rss() ?>" />
    39 		<link rel="alternate" type="text/html" href="<?php the_permalink_rss() ?>" />
    40 		<id><?php the_guid(); ?></id>
    40 		<id><?php the_guid() ; ?></id>
    41 		<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
    41 		<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
    42 		<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
    42 		<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
    43 		<?php the_category_rss('atom') ?>
    43 		<?php the_category_rss('atom') ?>
    44 		<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
    44 		<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
    45 <?php if ( !get_option('rss_use_excerpt') ) : ?>
    45 <?php if ( !get_option('rss_use_excerpt') ) : ?>