From 68166b1851ea1fae84bbb168ccaea584625d12bb Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 14 Feb 2008 05:40:19 +0000 Subject: [PATCH] Add more sort options to wp_get_object_terms(). Props andy. fixes #5245 git-svn-id: https://develop.svn.wordpress.org/trunk@6843 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index b08a5e6c15..1801e55d2a 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -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);