[wp-trac] [WordPress Trac] #19040: get_posts() expects invalid 'orderby' arguments + suggestion

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 26 04:59:10 UTC 2011

#19040: get_posts() expects invalid 'orderby' arguments + suggestion
 Reporter:  abrcam                   |       Owner:
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Query                    |     Version:  3.2.1
 Severity:  normal                   |  Resolution:  invalid
 Keywords:  close reporter-feedback  |
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


 Replying to [ticket:19040 abrcam]:
 > '''Fix'''
 > Rename `date` to `post_date` in line 2320.

 As kawauso pointed out, the prefix is added later:[[BR]]

 `'orderby' => 'menu_order post_date'` in your code should be `'orderby' =>
 'menu_order date'`, so this part of the ticket is invalid.

 > '''Suggestion'''
 > Allow passing different `order` values for different `orderby` columns,
 e.g. `ORDER BY post_date ASC, menu_order ASC`. Right now, the same `order`
 is applied to all `orderby` columns.

 This part is a duplicate of #17065.

Ticket URL: <http://core.trac.wordpress.org/ticket/19040#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list