[wp-trac] [WordPress Trac] #44975: REST API support switching draft to unscheduled
WordPress Trac
noreply at wordpress.org
Tue Oct 9 03:00:16 UTC 2018
#44975: REST API support switching draft to unscheduled
-----------------------------+------------------------------
Reporter: mnelson4 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by jnylen0):
> the way WP has worked for years to my mind has been to embrace
contextual solutions to historical inconsistencies
When this involves encouraging API clients to write convoluted code,
that's where I stop being convinced that it's the right solution.
I originally changed the behavior of the `date_gmt` field in the API
because posts should always have a usable UTC date field. I did that
because working with UTC and possibly a timezone is the only provably
correct way to handle dates, and so the `date_gmt` field should always
mean the UTC date and nothing else.
> I think we have already perpetuated those mistakes by returning a
"false" date when a post is floating, rather than providing `null` in that
instance
It's not a `null` date, though, because you still have the creation date
of the draft. The root problem here is the lack of a clearly designed
data model from the start. Some more thoughts on that
[https://core.trac.wordpress.org/ticket/39953#comment:15 here].
----
Anyway, I'm not going to be spending any further time on this. It's a
tricky issue, and I trust y'all to come up with a solution that works.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44975#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list