summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--wp-includes/taxonomy.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
index 8ea976ffac..514574e25d 100644
--- a/wp-includes/taxonomy.php
+++ b/wp-includes/taxonomy.php
@@ -1926,6 +1926,10 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
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);