mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Feeds: Revert [32765] because of objections raised in #4575.
Built from https://develop.svn.wordpress.org/trunk@33281 git-svn-id: http://core.svn.wordpress.org/trunk@33253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2883bbbb68
commit
3271513442
@ -43,7 +43,7 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
|
||||
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
|
||||
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<lastBuildDate><?php echo mysql2date('r', get_last_build_date_feed(), false ); ?></lastBuildDate>
|
||||
<lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
|
||||
<sy:updatePeriod><?php
|
||||
/** This filter is documented in wp-includes/feed-rss2.php */
|
||||
echo apply_filters( 'rss_update_period', 'hourly' );
|
||||
|
@ -42,7 +42,7 @@ do_action( 'rss_tag_pre', 'rss2' );
|
||||
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
|
||||
<link><?php bloginfo_rss('url') ?></link>
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last_build_date_feed(), false); ?></lastBuildDate>
|
||||
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
|
||||
<language><?php bloginfo_rss( 'language' ); ?></language>
|
||||
<sy:updatePeriod><?php
|
||||
$duration = 'hourly';
|
||||
|
@ -87,41 +87,6 @@ function get_default_feed() {
|
||||
return 'rss' == $default_feed ? 'rss2' : $default_feed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the timestamp of the most recently modified post from WP_Query.
|
||||
*
|
||||
* If viewing a comment feed, the date of the most recently modified
|
||||
* comment will be returned.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @return string Date ('Y-m-d H:i:s' for use with mysql2date()).
|
||||
*/
|
||||
function get_last_build_date_feed() {
|
||||
global $wp_query, $wpdb;
|
||||
|
||||
if ( $wp_query->have_posts() ) {
|
||||
$post_ids = array();
|
||||
$post_times = array();
|
||||
foreach( $wp_query->posts as $post ) {
|
||||
$post_ids[] = $post->ID;
|
||||
$post_times[] = $post->post_modified_gmt;
|
||||
}
|
||||
$postids = implode( "','", $post_ids );
|
||||
$max_post_time = max( $post_times );
|
||||
|
||||
if ( $wp_query->is_comment_feed() ) {
|
||||
$max_comment_time = $wpdb->get_var( $wpdb->prepare( "SELECT MAX(comment_date_gmt) FROM $wpdb->comments WHERE comment_post_ID IN ('%s') AND comment_approved = '1'", $postids ) );
|
||||
|
||||
return max( $max_post_time, $max_comment_time );
|
||||
}
|
||||
return $max_post_time;
|
||||
}
|
||||
|
||||
// Fallback to last time any post was modified or published.
|
||||
return get_lastpostmodified( 'GMT' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the blog title for the feed title.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-beta2-33280';
|
||||
$wp_version = '4.3-beta2-33281';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user