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

WordPress Trac noreply at wordpress.org
Sun Sep 23 12:50:15 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:
-----------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> [[https://core.trac.wordpress.org/ticket/39953|Trac ticket 33995] allows
> REST API clients to send a post's date in a POST request, and either
> leave the post as "date floating" (draft that says 'Publish immediately')
> switch it to be "non-date-floating" (draft that says 'Schedule for...').
>
> However, REST API clients cannot make a request to switch the post BACK
> to being "date floating" (mentioned on
> https://core.trac.wordpress.org/ticket/39953#comment:25 and
> https://core.trac.wordpress.org/ticket/39953#comment:34).
>
> This option isn't available in WordPress' default editor either (see
> https://core.trac.wordpress.org/ticket/8368#comment:20). However, from my
> testing, WordPress.com's Calypso editor DOES allow this. Also there's
> [[https://core.trac.wordpress.org/ticket/8368|a very old ticket
> suggesting it be added]], so it seems reasonable that the REST API should
> support this (and maybe Gutenberg too someday).
>
> So how should a REST API client specify they want to switch a post back
> to date floating (say "Publish immediately" in the classic editor)?
>
> Should they provide a post's `date` set to `null`, `false`, `''`, or
> maybe even to the same value as `modified`? (I suggest that last one
> because that's how you leave a currently-"date floating" post as-is, see
> https://core.trac.wordpress.org/ticket/39953#comment:25)

New description:

 Ticket #39953 allows REST API clients to send a post's date in a POST
 request, and either leave the post as "date floating" (draft that says
 'Publish immediately') switch it to be "non-date-floating" (draft that
 says 'Schedule for...').

 However, REST API clients cannot make a request to switch the post BACK to
 being "date floating" (mentioned on
 https://core.trac.wordpress.org/ticket/39953#comment:25 and
 https://core.trac.wordpress.org/ticket/39953#comment:34).

 This option isn't available in WordPress' default editor either (see
 https://core.trac.wordpress.org/ticket/8368#comment:20). However, from my
 testing, WordPress.com's Calypso editor DOES allow this. Also there's a
 very old ticket suggesting it be added: #8368, so it seems reasonable that
 the REST API should support this (and maybe Gutenberg too someday).

 So how should a REST API client specify they want to switch a post back to
 date floating (say "Publish immediately" in the classic editor)?

 Should they provide a post's `date` set to `null`, `false`, `''`, or maybe
 even to the same value as `modified`? (I suggest that last one because
 that's how you leave a currently-"date floating" post as-is, see
 https://core.trac.wordpress.org/ticket/39953#comment:25)

--

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


More information about the wp-trac mailing list