Opened 9 years ago
Closed 7 years ago
#41227 closed defect (bug) (duplicate)
Ability to pass post_modified and post_modified_gmt to wp_insert_post
| Reported by: | shamim51 | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests 2nd-opinion |
| Cc: | Focuses: |
Description
It is hard-coded that post_modified and post_modified_gmt will be current time or post_date. But sometimes it can be needed to have custom date passed to wp_insert_post/wp_update_post.
Attachments (2)
Change History (8)
Note:
See TracTickets
for help on using tickets.
I believe this issue should actually be classified as a bug. According to the docblock for
wp_insert_post(), the values forpost_modifiedandpost_modified_gmtshould already be accepted.I'm uploading a refreshed patch that includes unit tests.