[wp-trac] [WordPress Trac] #44975: REST API support switching draft to unscheduled

WordPress Trac noreply at wordpress.org
Thu Oct 4 18:21:51 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 kadamwhite):

 > If you were writing a new piece of code today that manipulates various
 date values, and also has a flag to control a specific date-related
 behavior, independent of the actual values of the dates, would you re-use
 a special value of one of the date variables to control this independent
 and separate flag, or use a different variable?

 Put another way, as I understand the existing behavior, this argument
 inaccurate; the value of the date in the database, namely
 `0000-00-00T00:00:00`, _is_ the actual value that represents date
 floating. The presence of that zeroed-out value is a placeholder for a
 specific publish date's non-existence, i.e. the state of having floating
 date. That state is not stored as a separate flag in the data model, and
 representing it as such would further confuse the situation. Better, then,
 to do what is proposed in this ticket, and accept a `null` value when
 writing a post, which will be converted to the zeroed-out placeholder on
 save.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44975#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list