Changeset 42343 for trunk/src/wp-includes/feed-atom.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/feed-atom.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/feed-atom.php
r42228 r42343 6 6 */ 7 7 8 header( 'Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);8 header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true ); 9 9 $more = 1; 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 12 13 13 /** This action is documented in wp-includes/feed-rss2.php */ … … 18 18 xmlns:thr="http://purl.org/syndication/thread/1.0" 19 19 xml:lang="<?php bloginfo_rss( 'language' ); ?>" 20 xml:base="<?php bloginfo_rss( 'url')?>/wp-atom.php"20 xml:base="<?php bloginfo_rss( 'url' ); ?>/wp-atom.php" 21 21 <?php 22 22 /** … … 29 29 > 30 30 <title type="text"><?php wp_title_rss(); ?></title> 31 <subtitle type="text"><?php bloginfo_rss( "description")?></subtitle>31 <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> 32 32 33 <updated><?php 33 <updated> 34 <?php 34 35 $date = get_lastpostmodified( 'GMT' ); 35 36 echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' ); 36 ?></updated> 37 ?> 38 </updated> 37 39 38 <link rel="alternate" type="<?php bloginfo_rss( 'html_type'); ?>" href="<?php bloginfo_rss('url')?>" />39 <id><?php bloginfo( 'atom_url'); ?></id>40 <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" /> 41 <id><?php bloginfo( 'atom_url' ); ?></id> 40 42 <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" /> 41 43 … … 48 50 do_action( 'atom_head' ); 49 51 50 while ( have_posts() ) : the_post(); 52 while ( have_posts() ) : 53 the_post(); 51 54 ?> 52 55 <entry> 53 56 <author> 54 <name><?php the_author() ?></name> 55 <?php $author_url = get_the_author_meta('url'); if ( !empty($author_url) ) : ?> 56 <uri><?php the_author_meta('url')?></uri> 57 <?php endif; 57 <name><?php the_author(); ?></name> 58 <?php $author_url = get_the_author_meta( 'url' ); if ( ! empty( $author_url ) ) : ?> 59 <uri><?php the_author_meta( 'url' ); ?></uri> 60 <?php 61 endif; 58 62 59 63 /** … … 65 69 ?> 66 70 </author> 67 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>68 <link rel="alternate" type="<?php bloginfo_rss( 'html_type'); ?>" href="<?php the_permalink_rss()?>" />69 <id><?php the_guid() ; ?></id>70 <updated><?php echo get_post_modified_time( 'Y-m-d\TH:i:s\Z', true); ?></updated>71 <published><?php echo get_post_time( 'Y-m-d\TH:i:s\Z', true); ?></published>72 <?php the_category_rss( 'atom')?>71 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title> 72 <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>" /> 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' ); ?> 73 77 <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 74 <?php if ( ! get_option('rss_use_excerpt') ) : ?>75 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><![CDATA[<?php the_content_feed('atom')?>]]></content>78 <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?> 79 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss(); ?>"><![CDATA[<?php the_content_feed( 'atom' ); ?>]]></content> 76 80 <?php endif; ?> 77 <?php atom_enclosure(); 81 <?php 82 atom_enclosure(); 78 83 /** 79 84 * Fires at the end of each Atom feed item. … … 85 90 if ( get_comments_number() || comments_open() ) : 86 91 ?> 87 <link rel="replies" type="<?php bloginfo_rss( 'html_type'); ?>" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/>88 <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()?>"/>89 <thr:total><?php echo get_comments_number() ?></thr:total>92 <link rel="replies" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>#comments" thr:count="<?php echo get_comments_number(); ?>"/> 93 <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(); ?>"/> 94 <thr:total><?php echo get_comments_number(); ?></thr:total> 90 95 <?php endif; ?> 91 96 </entry> 92 <?php endwhile ; ?>97 <?php endwhile; ?> 93 98 </feed>
Note: See TracChangeset
for help on using the changeset viewer.