Small code formatting tweak
git-svn-id: https://develop.svn.wordpress.org/trunk@6986 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fef755b796
commit
47cec19e53
|
@ -1190,10 +1190,9 @@ class WP_Query {
|
||||||
if ( in_array($orderby_array[$i], $allowed_keys) )
|
if ( in_array($orderby_array[$i], $allowed_keys) )
|
||||||
$q['orderby'] .= (($i == 0) ? '' : ',') . $orderby;
|
$q['orderby'] .= (($i == 0) ? '' : ',') . $orderby;
|
||||||
}
|
}
|
||||||
/* append ASC or DESC at the end */
|
// append ASC or DESC at the end
|
||||||
if ( !empty($q['orderby'])){
|
if ( !empty($q['orderby']))
|
||||||
$q['orderby'] .= " {$q['order']}";
|
$q['orderby'] .= " {$q['order']}";
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty($q['orderby']) )
|
if ( empty($q['orderby']) )
|
||||||
$q['orderby'] = 'post_date '.$q['order'];
|
$q['orderby'] = 'post_date '.$q['order'];
|
||||||
|
|
Loading…
Reference in New Issue