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:
ryan 2008-02-14 05:40:19 +00:00
parent be25bfa72f
commit e3b7a9c202
1 changed files with 6 additions and 0 deletions

View File

@ -1029,6 +1029,12 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
$orderby = 'tt.count'; $orderby = 'tt.count';
else if ( 'name' == $orderby ) else if ( 'name' == $orderby )
$orderby = 't.name'; $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) . "'"; $taxonomies = "'" . implode("', '", $taxonomies) . "'";
$object_ids = implode(', ', $object_ids); $object_ids = implode(', ', $object_ids);