Add orderby=none. Props DD32. fixes #9819

git-svn-id: http://svn.automattic.com/wordpress/trunk@11415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-20 21:26:00 +00:00
parent a6580f16f5
commit 3d208ee264

View File

@ -2019,6 +2019,8 @@ class WP_Query {
// Order by
if ( empty($q['orderby']) ) {
$q['orderby'] = "$wpdb->posts.post_date ".$q['order'];
} elseif ( 'none' == $q['orderby'] ) {
$q['orderby'] = '';
} else {
// Used to filter values
$allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand');