[wp-trac] [WordPress Trac] #13661: Support id=>name in fields arg of get_terms()

WordPress Trac wp-trac at lists.automattic.com
Mon May 31 18:46:53 UTC 2010


#13661: Support id=>name in fields arg of get_terms()
--------------------------+-------------------------------------------------
 Reporter:  mikeschinkel  |       Owner:            
     Type:  enhancement   |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Taxonomy      |     Version:  3.0       
 Severity:  normal        |    Keywords:  has-patch 
--------------------------+-------------------------------------------------
 In trying to use `get_terms()` I found it didn't support what seemed a
 common use case; an array where keys were `$term->term_id` and the values
 where `$term->name`.

 This patch adds functionailty for a "`id=>name`" in `fields` arg of
 `get_terms()`. It returns array of term names keyed by the term id.

 This path is similar to changeset:12729 by ryan on 2010-Jan-15.

 I searched for a similar ticket but didn't find anything recently related.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13661>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list