[wp-trac] [WordPress Trac] #40157: Batch query for media returns items in DESC order instead of post__in

WordPress Trac noreply at wordpress.org
Wed Mar 15 07:30:35 UTC 2017


#40157: Batch query for media returns items in DESC order instead of post__in
----------------------------+--------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  4.7.4
Component:  REST API        |     Version:  4.7
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+--------------------

Comment (by bor0):

 If you include orderby=include, it sorts them correctly:
 https://highforthis.com/wp-
 json/wp/v2/media?include[]=2719&include[]=2724&include[]=2728&orderby=include

 Otherwise, the sort defaults to date.

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


More information about the wp-trac mailing list