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:
parent
a6580f16f5
commit
3d208ee264
|
@ -2019,6 +2019,8 @@ class WP_Query {
|
||||||
// Order by
|
// Order by
|
||||||
if ( empty($q['orderby']) ) {
|
if ( empty($q['orderby']) ) {
|
||||||
$q['orderby'] = "$wpdb->posts.post_date ".$q['order'];
|
$q['orderby'] = "$wpdb->posts.post_date ".$q['order'];
|
||||||
|
} elseif ( 'none' == $q['orderby'] ) {
|
||||||
|
$q['orderby'] = '';
|
||||||
} else {
|
} else {
|
||||||
// Used to filter values
|
// Used to filter values
|
||||||
$allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand');
|
$allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand');
|
||||||
|
|
Loading…
Reference in New Issue