[wp-trac] [WordPress Trac] #29839: Enhance get_terms to return only bottom child terms (terms without children) when taxonomy is heirarchical

WordPress Trac noreply at wordpress.org
Sat Nov 15 21:07:57 UTC 2014


#29839: Enhance get_terms to return only bottom child terms (terms without
children) when taxonomy is heirarchical
------------------------------------------------+--------------------------
 Reporter:  theMikeD                            |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Future
Component:  Taxonomy                            |  Release
 Severity:  normal                              |     Version:  4.0
 Keywords:  4.2-early good-first-bug has-patch  |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------

Comment (by theMikeD):

 I have another question.

 `$childless = $args['childless']; // boolean`

 is in the code I added to `taxonomy.php` but I don't enforce the fact that
 `$args['childless']` is in fact boolean. Is that handled somewhere or is
 it safe to assume that `!false` or `!0` is true with the boolean options?
 I based this on  `$args['hierarchical']` which also doesn't check this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29839#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list