Validate $order in wp_get_object_terms(). props duck_.
git-svn-id: https://develop.svn.wordpress.org/trunk@21758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1e7a5ed329
commit
f8b0fb06fe
@ -1940,6 +1940,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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user