[wp-trac] [WordPress Trac] #26128: Default orderby for get_posts() is, date.

WordPress Trac noreply at wordpress.org
Wed Nov 20 10:50:20 UTC 2013


#26128: Default orderby for get_posts() is, date.
--------------------------+-----------------------------
 Reporter:  ounziw        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  3.7.1
 Severity:  trivial       |   Keywords:
--------------------------+-----------------------------
 Default orderby for get_posts() is, '''date''', not '''post_date'''

 WP_Query::get_posts allows array('name', 'author', 'date', 'title',
 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count').
 http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-
 includes/query.php#L2575

 WP_Query::get_posts adds the prefix "post_",
 http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-
 includes/query.php#L2615

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26128>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list