[wp-trac] [WordPress Trac] #44975: REST API support switching draft to unscheduled
WordPress Trac
noreply at wordpress.org
Mon Sep 23 16:01:36 UTC 2019
#44975: REST API support switching draft to unscheduled
-------------------------------------------------+-------------------------
Reporter: mnelson4 | Owner:
| adamsilverstein
Type: feature request | Status: assigned
Priority: normal | Milestone: 5.3
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by Rarst):
> In the patch we specifically set post_date and post_date_gmt to null if
the REST request parameter value is null. However, we could instead set
that to 0000-00-00 00:00:00 if that'd be better.
I don't think that makes a particular difference.
> Do you have ideas what might be broken?
Not specifically and I don't have it in me to start untangling ''that''
mess at the moment.
> Did you see @kadamwhite's comment?
Yeah, we chatted some out of thread as well.
Basically this is a mess on top of a mess. If your goal is to be most
consistent with existing layers of mess then sending `null` through REST
API to reset date fields is probably passable solution.
I'd like to see this behavior entirely untangled from date fields (come
on, this is not some peace of classical beauty, this is weird ancient
kludge of crazy implementation detail) but that's probably not happening
in context of REST API.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44975#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list