mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Fix default orderby for tt_id query. see #9937
git-svn-id: http://svn.automattic.com/wordpress/trunk@11469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b32a87962a
commit
d77f57c34f
@ -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