Add orderby=none. Props DD32. fixes #9819

git-svn-id: https://develop.svn.wordpress.org/trunk@11415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-20 21:26:00 +00:00
parent 848507ccff
commit 47556a2dad
1 changed files with 2 additions and 0 deletions

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');