[wp-trac] [WordPress Trac] #39055: REST API: order is ignored when orderby is set to include

WordPress Trac noreply at wordpress.org
Sat Dec 24 18:50:31 UTC 2016


#39055: REST API: order is ignored when orderby is set to include
----------------------------------------+------------------
 Reporter:  joshlevinson                |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  4.8
Component:  Query                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by jnylen0):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 Hi @sanket.parmar - thanks for the patch. This change does need unit tests
 also.

 I don't think we should sort the array, just reverse it if needed.
 Returning results in the order specified in the request should correspond
 to `orderby=asc`.

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


More information about the wp-trac mailing list