[wp-trac] [WordPress Trac] #39953: REST API: Add `date_auto_update` field for posts
WordPress Trac
noreply at wordpress.org
Thu Feb 23 19:47:45 UTC 2017
#39953: REST API: Add `date_auto_update` field for posts
-------------------------+------------------------------------------
Reporter: jnylen0 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Keywords: needs-patch needs-unit-tests
Focuses: rest-api |
-------------------------+------------------------------------------
If the `post_date_gmt` field for a draft is `0000-00-00 00:00:00`, WP core
uses this as a marker to update the date of the draft to the current time
whenever the post is updated. See ticket:5698#comment:14.
After #38883, there's not a way to determine whether a post is in this
status (being able to use the `date_gmt` field is far more important). To
restore this ability (and also add the ability to modify this status,
which has never been present in the REST API), we need to add a new
boolean field.
Storing this piece of information ("should we update the date of this post
when it's saved?") in a separate field is the way this functionality
should have been implemented from the beginning. It's probably too late
to make this change for WP core, but we can at least provide a better
design in the REST API.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39953>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list