Fix default orderby for tt_id query. see #9937
git-svn-id: https://develop.svn.wordpress.org/trunk@11469 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e38c2c7c07
commit
813973d04f
@ -1250,12 +1250,13 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||
$orderby = '';
|
||||
$order = '';
|
||||
} else {
|
||||
if ( 'tt_ids' == $fields )
|
||||
$orderby = 'tr.term_taxonomy_id';
|
||||
else
|
||||
$orderby = 't.term_id';
|
||||
$orderby = 't.term_id';
|
||||
}
|
||||
|
||||
// tt_ids queries can only be none or tr.term_taxonomy_id
|
||||
if ( ('tt_ids' == $fields) && !empty($orderby) )
|
||||
$orderby = 'tr.term_taxonomy_id';
|
||||
|
||||
if ( !empty($orderby) )
|
||||
$orderby = "ORDER BY $orderby";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user