From 47cec19e534c760ee1016f6b783d93d3094212b9 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 22 Feb 2008 20:48:28 +0000 Subject: [PATCH] Small code formatting tweak git-svn-id: https://develop.svn.wordpress.org/trunk@6986 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 4d81d4baae..fccc82836c 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1190,10 +1190,9 @@ class WP_Query { if ( in_array($orderby_array[$i], $allowed_keys) ) $q['orderby'] .= (($i == 0) ? '' : ',') . $orderby; } - /* append ASC or DESC at the end */ - if ( !empty($q['orderby'])){ + // append ASC or DESC at the end + if ( !empty($q['orderby'])) $q['orderby'] .= " {$q['order']}"; - } if ( empty($q['orderby']) ) $q['orderby'] = 'post_date '.$q['order'];