Edit File by line
/home/zeestwma/redstone.../wp-inclu...
File: feed-rss2-comments.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* RSS2 Feed Template for displaying RSS2 Comments feed.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
header( 'Content-Type: ' . feed_content_type( 'rss2' ) . '; charset=' . get_option( 'blog_charset' ), true );
[7] Fix | Delete
[8] Fix | Delete
echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>';
[9] Fix | Delete
[10] Fix | Delete
/** This action is documented in wp-includes/feed-rss2.php */
[11] Fix | Delete
do_action( 'rss_tag_pre', 'rss2-comments' );
[12] Fix | Delete
?>
[13] Fix | Delete
<rss version="2.0"
[14] Fix | Delete
xmlns:content="http://purl.org/rss/1.0/modules/content/"
[15] Fix | Delete
xmlns:dc="http://purl.org/dc/elements/1.1/"
[16] Fix | Delete
xmlns:atom="http://www.w3.org/2005/Atom"
[17] Fix | Delete
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
[18] Fix | Delete
<?php
[19] Fix | Delete
/** This action is documented in wp-includes/feed-rss2.php */
[20] Fix | Delete
do_action( 'rss2_ns' );
[21] Fix | Delete
?>
[22] Fix | Delete
[23] Fix | Delete
<?php
[24] Fix | Delete
/**
[25] Fix | Delete
* Fires at the end of the RSS root to add namespaces.
[26] Fix | Delete
*
[27] Fix | Delete
* @since 2.8.0
[28] Fix | Delete
*/
[29] Fix | Delete
do_action( 'rss2_comments_ns' );
[30] Fix | Delete
?>
[31] Fix | Delete
>
[32] Fix | Delete
<channel>
[33] Fix | Delete
<title>
[34] Fix | Delete
<?php
[35] Fix | Delete
if ( is_singular() ) {
[36] Fix | Delete
/* translators: Comments feed title. %s: Post title. */
[37] Fix | Delete
printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
[38] Fix | Delete
} elseif ( is_search() ) {
[39] Fix | Delete
/* translators: Comments feed title. 1: Site title, 2: Search query. */
[40] Fix | Delete
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
[41] Fix | Delete
} else {
[42] Fix | Delete
/* translators: Comments feed title. %s: Site title. */
[43] Fix | Delete
printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
[44] Fix | Delete
}
[45] Fix | Delete
?>
[46] Fix | Delete
</title>
[47] Fix | Delete
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
[48] Fix | Delete
<link><?php ( is_single() ) ? the_permalink_rss() : bloginfo_rss( 'url' ); ?></link>
[49] Fix | Delete
<description><?php bloginfo_rss( 'description' ); ?></description>
[50] Fix | Delete
<lastBuildDate><?php echo get_feed_build_date( 'r' ); ?></lastBuildDate>
[51] Fix | Delete
<sy:updatePeriod>
[52] Fix | Delete
<?php
[53] Fix | Delete
/** This filter is documented in wp-includes/feed-rss2.php */
[54] Fix | Delete
echo apply_filters( 'rss_update_period', 'hourly' );
[55] Fix | Delete
?>
[56] Fix | Delete
</sy:updatePeriod>
[57] Fix | Delete
<sy:updateFrequency>
[58] Fix | Delete
<?php
[59] Fix | Delete
/** This filter is documented in wp-includes/feed-rss2.php */
[60] Fix | Delete
echo apply_filters( 'rss_update_frequency', '1' );
[61] Fix | Delete
?>
[62] Fix | Delete
</sy:updateFrequency>
[63] Fix | Delete
<?php
[64] Fix | Delete
/**
[65] Fix | Delete
* Fires at the end of the RSS2 comment feed header.
[66] Fix | Delete
*
[67] Fix | Delete
* @since 2.3.0
[68] Fix | Delete
*/
[69] Fix | Delete
do_action( 'commentsrss2_head' );
[70] Fix | Delete
[71] Fix | Delete
while ( have_comments() ) :
[72] Fix | Delete
the_comment();
[73] Fix | Delete
$comment_post = get_post( $comment->comment_post_ID );
[74] Fix | Delete
/**
[75] Fix | Delete
* @global WP_Post $post Global post object.
[76] Fix | Delete
*/
[77] Fix | Delete
$GLOBALS['post'] = $comment_post;
[78] Fix | Delete
?>
[79] Fix | Delete
<item>
[80] Fix | Delete
<title>
[81] Fix | Delete
<?php
[82] Fix | Delete
if ( ! is_singular() ) {
[83] Fix | Delete
$title = get_the_title( $comment_post->ID );
[84] Fix | Delete
/** This filter is documented in wp-includes/feed.php */
[85] Fix | Delete
$title = apply_filters( 'the_title_rss', $title );
[86] Fix | Delete
/* translators: Individual comment title. 1: Post title, 2: Comment author name. */
[87] Fix | Delete
printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) ), $title, get_comment_author_rss() );
[88] Fix | Delete
} else {
[89] Fix | Delete
/* translators: Comment author title. %s: Comment author name. */
[90] Fix | Delete
printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() );
[91] Fix | Delete
}
[92] Fix | Delete
?>
[93] Fix | Delete
</title>
[94] Fix | Delete
<link><?php comment_link(); ?></link>
[95] Fix | Delete
[96] Fix | Delete
<dc:creator><![CDATA[<?php echo get_comment_author_rss(); ?>]]></dc:creator>
[97] Fix | Delete
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></pubDate>
[98] Fix | Delete
<guid isPermaLink="false"><?php comment_guid(); ?></guid>
[99] Fix | Delete
[100] Fix | Delete
<?php if ( post_password_required( $comment_post ) ) : ?>
[101] Fix | Delete
<description><?php echo ent2ncr( __( 'Protected Comments: Please enter your password to view comments.' ) ); ?></description>
[102] Fix | Delete
<content:encoded><![CDATA[<?php echo get_the_password_form(); ?>]]></content:encoded>
[103] Fix | Delete
<?php else : ?>
[104] Fix | Delete
<description><![CDATA[<?php comment_text_rss(); ?>]]></description>
[105] Fix | Delete
<content:encoded><![CDATA[<?php comment_text(); ?>]]></content:encoded>
[106] Fix | Delete
<?php endif; // End if post_password_required(). ?>
[107] Fix | Delete
[108] Fix | Delete
<?php
[109] Fix | Delete
/**
[110] Fix | Delete
* Fires at the end of each RSS2 comment feed item.
[111] Fix | Delete
*
[112] Fix | Delete
* @since 2.1.0
[113] Fix | Delete
*
[114] Fix | Delete
* @param int $comment_id The ID of the comment being displayed.
[115] Fix | Delete
* @param int $comment_post_id The ID of the post the comment is connected to.
[116] Fix | Delete
*/
[117] Fix | Delete
do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
[118] Fix | Delete
?>
[119] Fix | Delete
</item>
[120] Fix | Delete
<?php endwhile; ?>
[121] Fix | Delete
</channel>
[122] Fix | Delete
</rss>
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function