[wp-trac] [WordPress Trac] #39953: REST API: Add `date_floating` flag for posts

WordPress Trac noreply at wordpress.org
Thu Sep 20 18:07:47 UTC 2018


#39953: REST API: Add `date_floating` flag for posts
--------------------------------------+-----------------------
 Reporter:  jnylen0                   |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  5.0
Component:  REST API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+-----------------------

Comment (by mnelson4):

 I took this for a spin and basically double-checked what the unit tests
 are already asserting:

 * on a date-floating post, if you POST the same `date` you received in a
 GET request, it will remain date-floating

 * on a date-floating post, if you POST a different `date` than what you
 received in a GET request, it will no longer be date-floating

 * on a non-date-floating post, it will remain a non-date-floating post
 regardless of what you provide for `date`.

 So 👍

 However, I would think we'd want to also support transitioning back to
 date-floating (like I noted is supported in Calypso, and so is supported
 by the WP.com API). Eg for a non-date-floating post, if you passed an
 identical `date` and `modified` dates, the post should revert to date-
 floating (the database columns `post_date` and `post_date_gmt` are updated
 with the POST `date` value, the POST's `modified` value is ignored and
 `post_modified` and `post_modified_gmt` are instead updated to the current
 time). Should I make a separate issue for supporting updating a non-date-
 floating post to be date-floating again?

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


More information about the wp-trac mailing list