[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Atom Feed Template for displaying Atom Posts feed. 4 * 5 * @package WordPress 6 */ 7 8 header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true ); 9 $more = 1; 10 11 echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; 12 13 /** This action is documented in wp-includes/feed-rss2.php */ 14 do_action( 'rss_tag_pre', 'atom' ); 15 ?> 16 <feed 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" 21 <?php 22 /** 23 * Fires at end of the Atom feed root to add namespaces. 24 * 25 * @since 2.0.0 26 */ 27 do_action( 'atom_ns' ); 28 ?> 29 > 30 <title type="text"><?php wp_title_rss(); ?></title> 31 <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> 32 33 <updated><?php echo get_feed_build_date( 'Y-m-d\TH:i:s\Z' ); ?></updated> 34 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(); ?>" /> 38 39 <?php 40 /** 41 * Fires just before the first Atom feed entry. 42 * 43 * @since 2.0.0 44 */ 45 do_action( 'atom_head' ); 46 47 while ( have_posts() ) : 48 the_post(); 49 ?> 50 <entry> 51 <author> 52 <name><?php the_author(); ?></name> 53 <?php 54 $author_url = get_the_author_meta( 'url' ); 55 if ( ! empty( $author_url ) ) : 56 ?> 57 <uri><?php the_author_meta( 'url' ); ?></uri> 58 <?php 59 endif; 60 61 /** 62 * Fires at the end of each Atom feed author entry. 63 * 64 * @since 3.2.0 65 */ 66 do_action( 'atom_author' ); 67 ?> 68 </author> 69 70 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title> 71 <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>" /> 72 73 <id><?php the_guid(); ?></id> 74 <updated><?php echo get_post_modified_time( 'Y-m-d\TH:i:s\Z', true ); ?></updated> 75 <published><?php echo get_post_time( 'Y-m-d\TH:i:s\Z', true ); ?></published> 76 <?php the_category_rss( 'atom' ); ?> 77 78 <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 79 80 <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?> 81 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss(); ?>"><![CDATA[<?php the_content_feed( 'atom' ); ?>]]></content> 82 <?php endif; ?> 83 84 <?php 85 atom_enclosure(); 86 87 /** 88 * Fires at the end of each Atom feed item. 89 * 90 * @since 2.0.0 91 */ 92 do_action( 'atom_entry' ); 93 94 if ( get_comments_number() || comments_open() ) : 95 ?> 96 <link rel="replies" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>#comments" thr:count="<?php echo get_comments_number(); ?>"/> 97 <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(); ?>"/> 98 <thr:total><?php echo get_comments_number(); ?></thr:total> 99 <?php endif; ?> 100 </entry> 101 <?php endwhile; ?> 102 </feed>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Jan 21 08:20:02 2021 | Cross-referenced by PHPXref |