[wp-trac] [WordPress Trac] #16310: get_taxonomy_labels() and _get_custom_object_labels() fail if $object->taxonomy is not array

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 19 20:13:24 UTC 2011


#16310: get_taxonomy_labels() and _get_custom_object_labels() fail if
$object->taxonomy is not array
--------------------------+------------------------------
 Reporter:  foofy         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by nacin):

 Replying to [comment:4 foofy]:
 > nacin: That makes sense for _get_custom_object_labels() but
 get_taxonomy_labels() is a public API function.

 It shouldn't be. You should do this instead:
 {{{
 $tax = get_taxonomy('category');
 $labels = $tax->labels;
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16310#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list