[ 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 <?php 21 /** 22 * Fires at end of the Atom feed root to add namespaces. 23 * 24 * @since 2.0.0 25 */ 26 do_action( 'atom_ns' ); 27 ?> 28 > 29 <title type="text"><?php wp_title_rss(); ?></title> 30 <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> 31 32 <updated><?php echo get_feed_build_date( 'Y-m-d\TH:i:s\Z' ); ?></updated> 33 34 <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" /> 35 <id><?php bloginfo( 'atom_url' ); ?></id> 36 <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" /> 37 38 <?php 39 /** 40 * Fires just before the first Atom feed entry. 41 * 42 * @since 2.0.0 43 */ 44 do_action( 'atom_head' ); 45 46 while ( have_posts() ) : 47 the_post(); 48 ?> 49 <entry> 50 <author> 51 <name><?php the_author(); ?></name> 52 <?php 53 $author_url = get_the_author_meta( 'url' ); 54 if ( ! empty( $author_url ) ) : 55 ?> 56 <uri><?php the_author_meta( 'url' ); ?></uri> 57 <?php 58 endif; 59 60 /** 61 * Fires at the end of each Atom feed author entry. 62 * 63 * @since 3.2.0 64 */ 65 do_action( 'atom_author' ); 66 ?> 67 </author> 68 69 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title> 70 <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>" /> 71 72 <id><?php the_guid(); ?></id> 73 <updated><?php echo get_post_modified_time( 'Y-m-d\TH:i:s\Z', true ); ?></updated> 74 <published><?php echo get_post_time( 'Y-m-d\TH:i:s\Z', true ); ?></published> 75 <?php the_category_rss( 'atom' ); ?> 76 77 <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 78 79 <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?> 80 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss(); ?>"><![CDATA[<?php the_content_feed( 'atom' ); ?>]]></content> 81 <?php endif; ?> 82 83 <?php 84 atom_enclosure(); 85 86 /** 87 * Fires at the end of each Atom feed item. 88 * 89 * @since 2.0.0 90 */ 91 do_action( 'atom_entry' ); 92 93 if ( get_comments_number() || comments_open() ) : 94 ?> 95 <link rel="replies" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>#comments" thr:count="<?php echo get_comments_number(); ?>" /> 96 <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(); ?>" /> 97 <thr:total><?php echo get_comments_number(); ?></thr:total> 98 <?php endif; ?> 99 </entry> 100 <?php endwhile; ?> 101 </feed>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |