Ticket #25229: wp-includes-feed-rss2-comments.diff
File wp-includes-feed-rss2-comments.diff, 2.5 KB (added by , 11 years ago) |
---|
-
wp-includes/feed-rss2-comments.php
14 14 xmlns:dc="http://purl.org/dc/elements/1.1/" 15 15 xmlns:atom="http://www.w3.org/2005/Atom" 16 16 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 17 <?php do_action('rss2_ns'); do_action('rss2_comments_ns'); ?> 18 > 17 <?php 18 //duplicate_hook 19 do_action('rss2_ns'); 20 ?> 21 22 <?php 23 /** 24 * Fired at the end of the RSS root to add namespaces. 25 * 26 * @since 2.8.0 27 */ 28 do_action('rss2_comments_ns'); 29 ?> 30 > 19 31 <channel> 20 32 <title><?php 21 33 if ( is_singular() ) … … 29 41 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link> 30 42 <description><?php bloginfo_rss("description") ?></description> 31 43 <lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate> 44 <?php //duplicate_hook ?> 32 45 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> 46 <?php //duplicate_hook ?> 33 47 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency> 34 <?php do_action('commentsrss2_head'); ?> 48 <?php 49 /** 50 * Fired at the end of the RSS2 comment Feed Header. 51 * 52 * @since 2.3.0 53 */ 54 do_action('commentsrss2_head'); 55 ?> 35 56 <?php 36 57 if ( have_comments() ) : while ( have_comments() ) : the_comment(); 37 58 $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID ); … … 40 61 <title><?php 41 62 if ( !is_singular() ) { 42 63 $title = get_the_title($comment_post->ID); 64 //duplicate_hook 43 65 $title = apply_filters('the_title_rss', $title); 44 66 printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 45 67 } else { … … 57 79 <description><![CDATA[<?php comment_text_rss() ?>]]></description> 58 80 <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded> 59 81 <?php endif; // post pass 60 do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID); 82 $comment_id = $comment->comment_ID; 83 $comment_post_id = $comment_post->ID; 84 /** 85 * Fired at the end of each RSS2 comment feed item. 86 * 87 * @since 2.1.0 88 * 89 * @param $comment_id The ID of the comment being displayed. 90 * @param $comment_post_id The ID of the post connected to the comment. 91 */ 92 do_action('commentrss2_item', $comment_id, $comment_post_id); 61 93 ?> 62 94 </item> 63 95 <?php endwhile; endif; ?>