]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/taxonomy.php
WordPress 3.4.2
[autoinstalls/wordpress.git] / wp-includes / taxonomy.php
index 8ea976ffaca6e26b698c95180727abb9dc24b9e4..514574e25d94fec0e74f9e1d582faf6954cfcf9f 100644 (file)
@@ -1926,6 +1926,10 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
        if ( !empty($orderby) )
                $orderby = "ORDER BY $orderby";
 
        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);
 
        $taxonomies = "'" . implode("', '", $taxonomies) . "'";
        $object_ids = implode(', ', $object_ids);