mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 10:33:05 +01:00
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:
parent
848507ccff
commit
47556a2dad
@ -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…
x
Reference in New Issue
Block a user