[wp-trac] [WordPress Trac] #38985: REST API: Some orderby parameters are broken

WordPress Trac noreply at wordpress.org
Tue Nov 29 21:10:41 UTC 2016


#38985: REST API: Some orderby parameters are broken
--------------------------+------------------------------------------
 Reporter:  jnylen0       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.7
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  needs-patch needs-unit-tests
  Focuses:                |
--------------------------+------------------------------------------
 The `orderby` parameters `id` and `slug` are currently broken for posts.
 Since they don't map directly to `WP_Query` values, and there is no code
 to translate them, they don't do anything.

 The `include` parameter works, but only if a list of IDs is specified via
 the `include` parameter.  We should return an error for `orderby=include`
 without this parameter, like we do for `orderby=relevance` without
 `search`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38985>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list