[wp-trac] [WordPress Trac] #9667: Misinformation in the inline code comment documentation for get_term_children

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 28 12:16:47 GMT 2009


#9667: Misinformation in the inline code comment documentation for
get_term_children
---------------------------+------------------------------------------------
 Reporter:  simonwheatley  |       Owner:  ryan      
     Type:  enhancement    |      Status:  new       
 Priority:  normal         |   Milestone:  Unassigned
Component:  Taxonomy       |     Version:            
 Severity:  minor          |    Keywords:            
---------------------------+------------------------------------------------
 The inline documentation around get_term_children suggests that it will
 take a term name, the function argument $term suggests it would take a
 Term object; neither is true, it takes a term ID and returns an array of
 term IDs.

 I propose the attached patch which changes the function arg name to
 $term_id, and amends the inline documentation.

 The only addition, potentially mildly contentious I suppose, is that the
 diff uses absint to ensure the term ID passed is definitely an integer.

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


More information about the wp-trac mailing list