[wp-trac] [WordPress Trac] #25089: XML-RPC server wrongly conflates post_status "future" with "publish"

WordPress Trac noreply at wordpress.org
Sat Sep 13 11:34:38 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 rmccue):

 Replying to [comment:19 kailasa]:
 > 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."

 Agreed on documentation changes; it should probably be noted on
 [http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPosts the
 codex].

 > 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?

 Correct. If you want future posts, you need to explicitly pass
 `filter[post_status]=future`, otherwise you just get the currently-
 published posts.

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


More information about the wp-trac mailing list