From e3b7a9c202fad32b0f9a64fa3aade02bb1d1549e Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@6843 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index b08a5e6c1..1801e55d2 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);