if ( !empty($orderby) )
$orderby = "ORDER BY $orderby";
+ $order = strtoupper( $order );
+ if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) )
+ $order = 'ASC';
+
$taxonomies = "'" . implode("', '", $taxonomies) . "'";
$object_ids = implode(', ', $object_ids);