Ticket #4575: 4575_2.diff
File 4575_2.diff, 2.8 KB (added by , 9 years ago) |
---|
-
wp-includes/feed-rss2-comments.php
43 43 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 44 44 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link> 45 45 <description><?php bloginfo_rss("description") ?></description> 46 <lastBuildDate><?php echo mysql2date('r', get_last commentmodified('GMT')); ?></lastBuildDate>46 <lastBuildDate><?php echo mysql2date('r', get_last_build_date_feed(), false ); ?></lastBuildDate> 47 47 <sy:updatePeriod><?php 48 48 /** This filter is documented in wp-includes/feed-rss2.php */ 49 49 echo apply_filters( 'rss_update_period', 'hourly' ); -
wp-includes/feed-rss2.php
42 42 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 43 43 <link><?php bloginfo_rss('url') ?></link> 44 44 <description><?php bloginfo_rss("description") ?></description> 45 <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last postmodified('GMT'), false); ?></lastBuildDate>45 <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last_build_date_feed(), false); ?></lastBuildDate> 46 46 <language><?php bloginfo_rss( 'language' ); ?></language> 47 47 <sy:updatePeriod><?php 48 48 $duration = 'hourly'; -
wp-includes/feed.php
88 88 } 89 89 90 90 /** 91 * Get the timestamp of the most recently modified post from WP_Query 92 * 93 * If viewing a comment feed, the date of the most recently modified 94 * comment will be returned. 95 * 96 * @since 4.3.0 97 * 98 * @return string Date ('Y-m-d H:i:s' for use with mysql2date() ) 99 */ 100 function get_last_build_date_feed() { 101 global $wp_query, $wpdb; 102 103 if ( $wp_query->have_posts() ) { 104 $post_ids = array(); 105 foreach( $wp_query->posts as $post ) { 106 $post_ids[] = $post->ID; 107 $post_times[] = $post->post_modified_gmt; 108 } 109 $postids = implode( "','", $post_ids ); 110 $max_post_time = max( $post_times ); 111 112 if( $wp_query->is_comment_feed() ) { 113 $max_comment_time = $wpdb->get_var( $wpdb->prepare( "SELECT MAX($wpdb->comments.comment_date_gmt) FROM $wpdb->comments WHERE $wpdb->comments.comment_post_ID IN ('%s')", $postids ) ); 114 return max( $max_post_time, $max_comment_time ); 115 } 116 return $max_post_time; 117 } 118 119 // Fallback to last time any post was modified or published. 120 return get_lastpostmodified( 'GMT' ); 121 } 122 123 /** 91 124 * Retrieve the blog title for the feed title. 92 125 * 93 126 * @since 2.2.0