[wp-trac] [WordPress Trac] #26980: the_modified_date is lower than the_date when post is scheduled

WordPress Trac noreply at wordpress.org
Tue Apr 6 13:11:01 UTC 2021


#26980: the_modified_date is lower than the_date when post is scheduled
--------------------------+------------------------------
 Reporter:  tushonline    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  3.8
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by donmhico):

 I've attached a PR which updates `post_modified` and `post_modified_gmt`
 to `post_date` and `post_date_gmt` when publishing a scheduled post.

 I agree with @uatania. I've seen feed reader / apis which uses post
 modified date.

 My PR changes are inside `wp_publish_post()` since aside from
 transitioning scheduled post to published, i don't see any other use case
 of `wp_publish_post()` where this new change could potentially break
 something. Another set of eyes is more than welcome in case I missed
 something.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/26980#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list