[wp-trac] [WordPress Trac] #39256: REST API: Multiple issues with setting dates of posts
WordPress Trac
noreply at wordpress.org
Sat Feb 18 01:37:52 UTC 2017
#39256: REST API: Multiple issues with setting dates of posts
----------------------------------------+-----------------------
Reporter: jnylen0 | Owner: jnylen0
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.7.3
Component: REST API | Version: 4.7
Severity: major | Resolution:
Keywords: needs-patch has-unit-tests | Focuses:
----------------------------------------+-----------------------
Changes (by jnylen0):
* owner: => jnylen0
* status: new => accepted
Comment:
[attachment:39256.3.diff] addresses the '''second''' issue in the original
report (allows updating the date of a draft).
From
https://codex.wordpress.org/Function_Reference/wp_update_post#Scheduling_posts:
> If you are trying to use `wp_update_post()` to schedule an existing
draft, it will not work unless you pass `$my_post->edit_date = true`.
WordPress will ignore the `post_date` when updating drafts unless
`edit_date` is true.
I believe this is close to commit-ready. I plan to commit next week, in
particular please give feedback on the approach needed to change the
signature and behavior of `rest_get_date_with_gmt`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39256#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list