[wp-trac] [WordPress Trac] #47623: Feeds: <lastBuildDate> has incorrect date
WordPress Trac
noreply at wordpress.org
Sat Jun 29 00:39:32 UTC 2019
#47623: Feeds: <lastBuildDate> has incorrect date
--------------------------+--------------------------------------
Reporter: gustavogomes | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Feeds | Version: 5.2.2
Severity: major | Keywords: needs-patch has-dev-note
Focuses: |
--------------------------+--------------------------------------
The feed shouldn't use only the 'post_modified_gmt' to define the
lastBuildDate it does not always correspond to the date to be used.
So, on the file wp-includes/feed.php
Instead of
{{{#!php
<?php
// Extract the post modified times from the posts.
$modified_times = wp_list_pluck( $wp_query->posts,
'post_modified_gmt' );
}}}
Should be
{{{#!php
<?php
// Extract the post modified times from the posts.
$modified_times = wp_list_pluck( $wp_query->posts,
'post_modified_gmt' );
$modified_times = array_merge( $modified_times, wp_list_pluck(
$wp_query->posts, 'post_date_gmt' ) );
}}}
this is causing the feed to not update the lastBuildDate when you schedule
the post.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47623>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list