[wp-trac] [WordPress Trac] #46933: Re-publishing a drafted post does not update post_date in database
WordPress Trac
noreply at wordpress.org
Mon Apr 15 13:24:28 UTC 2019
#46933: Re-publishing a drafted post does not update post_date in database
-------------------------------+-----------------------------
Reporter: subrataemfluence | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
I am not sure if this is a bug really! But when I re-published a drafted
post I have seen the `modified_date` changes but `post_date` does not.
How I tested:
1. Created a post (Post-1) and saved as `Draft`.
2. Edited it and `Published`. Both `post_date` and `post_modified` get
updated.
3. Created a new post (Post-2) and `Published` it. Both `post_date` and
`post_modified` dates are same, which is fine.
4. Edited and switched it back to `Draft` mode. `post_modified` got
updated.
5. Then again edited to `Publish` it. Only `post_modified` column got
updated.
In short, if I publish a post which was originally saved as draft, both
date columns are getting updated, but the behavior is different if I re-
publish a post which was originally Published and then switched back to
Draft mode.
Has this been done in purpose so that the once a post is **published** its
`post_date` will not update (unless I change it via Quick Edit)?
The question is when a post can be re-published, why not the recent
publish date gets saved in the database.
Since I am not sure if this is a bug, I am setting the type as
`Enhancement`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46933>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list