Add more sort options to wp_get_object_terms(). Props andy. fixes #5245
git-svn-id: http://svn.automattic.com/wordpress/trunk@6843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be25bfa72f
commit
e3b7a9c202
|
@ -1029,6 +1029,12 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
|||
$orderby = 'tt.count';
|
||||
else if ( 'name' == $orderby )
|
||||
$orderby = 't.name';
|
||||
else if ( 'slug' == $orderby )
|
||||
$orderby = 't.slug';
|
||||
else if ( 'term_group' == $orderby )
|
||||
$orderby = 't.term_group';
|
||||
else
|
||||
$orderby = 't.term_id';
|
||||
|
||||
$taxonomies = "'" . implode("', '", $taxonomies) . "'";
|
||||
$object_ids = implode(', ', $object_ids);
|
||||
|
|
Loading…
Reference in New Issue