wp/wp-includes/feed-atom-comments.php
changeset 21 48c4eec2b7e6
parent 16 a86126ab1dd4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    67 	do_action( 'comments_atom_head' );
    67 	do_action( 'comments_atom_head' );
    68 ?>
    68 ?>
    69 <?php
    69 <?php
    70 while ( have_comments() ) :
    70 while ( have_comments() ) :
    71 	the_comment();
    71 	the_comment();
    72 	$comment_post    = get_post( $comment->comment_post_ID );
    72 	$comment_post = get_post( $comment->comment_post_ID );
       
    73 	/**
       
    74 	 * @global WP_Post $post Global post object.
       
    75 	 */
    73 	$GLOBALS['post'] = $comment_post;
    76 	$GLOBALS['post'] = $comment_post;
    74 	?>
    77 	?>
    75 	<entry>
    78 	<entry>
    76 		<title>
    79 		<title>
    77 		<?php
    80 		<?php
    91 
    94 
    92 		<author>
    95 		<author>
    93 			<name><?php comment_author_rss(); ?></name>
    96 			<name><?php comment_author_rss(); ?></name>
    94 			<?php
    97 			<?php
    95 			if ( get_comment_author_url() ) {
    98 			if ( get_comment_author_url() ) {
    96 				echo '<uri>' . get_comment_author_url() . '</uri>';}
    99 				echo '<uri>' . get_comment_author_url() . '</uri>';
       
   100 			}
    97 			?>
   101 			?>
    98 
   102 
    99 		</author>
   103 		</author>
   100 
   104 
   101 		<id><?php comment_guid(); ?></id>
   105 		<id><?php comment_guid(); ?></id>
   108 			<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
   112 			<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
   109 		<?php endif; // End if post_password_required(). ?>
   113 		<?php endif; // End if post_password_required(). ?>
   110 
   114 
   111 		<?php
   115 		<?php
   112 		// Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt).
   116 		// Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt).
   113 		if ( 0 == $comment->comment_parent ) : // This comment is top-level.
   117 		if ( '0' === $comment->comment_parent ) : // This comment is top-level.
   114 			?>
   118 			?>
   115 			<thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss(); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
   119 			<thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss(); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
   116 			<?php
   120 			<?php
   117 		else : // This comment is in reply to another comment.
   121 		else : // This comment is in reply to another comment.
   118 			$parent_comment = get_comment( $comment->comment_parent );
   122 			$parent_comment = get_comment( $comment->comment_parent );