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

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 25 13:40:39 UTC 2011


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

 * keywords:   => close reporter-feedback


Comment:

 I don't see how this is a bug given that the current orderby parameters
 are well documented:
 http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

 Most orderby parameters have the prefix added later (lines 2366-7 on
 trunk):
 {{{
 default:
         $orderby = "$wpdb->posts.post_" . $orderby;
 }}}

 Renaming them would result in a massive backcompat headache as well. Maybe
 I'm missing something here?

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


More information about the wp-trac mailing list