mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Allow querying by menu_order. Props wonderboymusic. fixes #21618
git-svn-id: https://develop.svn.wordpress.org/trunk@21748 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f0b2a4f8aa
commit
ca00a01d11
@ -1452,6 +1452,7 @@ class WP_Query {
|
||||
if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
|
||||
if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']);
|
||||
if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']);
|
||||
if ( '' !== $qv['menu_order'] ) $qv['menu_order'] = absint($qv['menu_order']);
|
||||
|
||||
// Compat. Map subpost to attachment.
|
||||
if ( '' != $qv['subpost'] )
|
||||
@ -2040,6 +2041,9 @@ class WP_Query {
|
||||
$fields = "$wpdb->posts.*";
|
||||
}
|
||||
|
||||
if ( '' !== $q['menu_order'] )
|
||||
$where .= " AND $wpdb->posts.menu_order = " . $q['menu_order'];
|
||||
|
||||
// If a month is specified in the querystring, load that month
|
||||
if ( $q['m'] ) {
|
||||
$q['m'] = '' . preg_replace('|[^0-9]|', '', $q['m']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user