wp/wp-includes/feed-rss2-comments.php
changeset 21 48c4eec2b7e6
parent 16 a86126ab1dd4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    70 	 */
    70 	 */
    71 	do_action( 'commentsrss2_head' );
    71 	do_action( 'commentsrss2_head' );
    72 
    72 
    73 	while ( have_comments() ) :
    73 	while ( have_comments() ) :
    74 		the_comment();
    74 		the_comment();
    75 		$comment_post    = get_post( $comment->comment_post_ID );
    75 		$comment_post = get_post( $comment->comment_post_ID );
       
    76 		/**
       
    77 		 * @global WP_Post $post Global post object.
       
    78 		 */
    76 		$GLOBALS['post'] = $comment_post;
    79 		$GLOBALS['post'] = $comment_post;
    77 		?>
    80 		?>
    78 	<item>
    81 	<item>
    79 		<title>
    82 		<title>
    80 		<?php
    83 		<?php
   108 		/**
   111 		/**
   109 		 * Fires at the end of each RSS2 comment feed item.
   112 		 * Fires at the end of each RSS2 comment feed item.
   110 		 *
   113 		 *
   111 		 * @since 2.1.0
   114 		 * @since 2.1.0
   112 		 *
   115 		 *
   113 		 * @param int $comment_ID The ID of the comment being displayed.
   116 		 * @param int $comment_id      The ID of the comment being displayed.
   114 		 * @param int $ID         The ID of the post the comment is connected to.
   117 		 * @param int $comment_post_id The ID of the post the comment is connected to.
   115 		 */
   118 		 */
   116 		do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
   119 		do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
   117 		?>
   120 		?>
   118 	</item>
   121 	</item>
   119 	<?php endwhile; ?>
   122 	<?php endwhile; ?>