[wp-trac] [WordPress Trac] #25089: XML-RPC server wrongly conflates post_status "future" with "publish"
WordPress Trac
noreply at wordpress.org
Fri Sep 12 20:22:30 UTC 2014
#25089: XML-RPC server wrongly conflates post_status "future" with "publish"
--------------------------------------+---------------------------
Reporter: kailasa | Owner: markoheijnen
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: XML-RPC | Version: 3.4
Severity: normal | Resolution: invalid
Keywords: 2nd-opinion dev-feedback | Focuses:
--------------------------------------+---------------------------
Comment (by kailasa):
"I'd agree that if you get the most recent posts, it shouldn't include
future-published posts, but it may break backwards compatibility to change
this on the XML-RPC endpoints now."
Unfortunate.... means more spaghetti code because we can depend of on the
database to deliver what is actually there. We have to dig and filter on
date strings [>today] after the data arrives.
It would be good to put this in the documentation: "If you fetch current
posts using the XMP-RPC, please be aware that you will get all published
posts, including those schedule for future distribution. If you need to
limit display to only posts for today into the past you will need to also
fetch the post date and then write filters on your own to make sure future
posts are not included in the stream."
So do I understand that (seems obvious but I want to be explicit) "the
REST API uses filter[post_status]=future (since it's just WP Query under
the hood), but also reports the status field value as publish." means that
it *does not* fetch future posts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25089#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list