[wp-trac] [WordPress Trac] #29424: [WP 4.0] - orderby duplicated paramaters possible

WordPress Trac noreply at wordpress.org
Fri Aug 29 10:22:07 UTC 2014


#29424: [WP 4.0] - orderby duplicated paramaters possible
--------------------------+-----------------------------
 Reporter:  ChriCo        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In your newest post in [make-
 blog](http://make.wordpress.org/core/2014/08/29/a-more-powerful-order-by-
 in-wordpress-4-0/) there a serveral errors in code.

 1. Duplicated parameters are possible. Following Code will output the
 "error":

 {{{

 $query = new WP_Query( array( 'orderby' => array( 'title' => 'DESC',
 'post_title' => 'ASC' ) ) );

 //ouputs: ORDER BY post_title DESC, post_title ASC
 }}}

 2. Why is

 * "title" equal to "post_title"
 * "name" to "post_name"
 * "author" to "post_author"

 and so on?

 3. By the way, "date_gmt", "post_status", "modifed_gmt",
 "content_filtered", "mime_type", "type" are missing...

 4. there are some columns missing in "orderby".

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


More information about the wp-trac mailing list