[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
Sun Nov 23 17:05:05 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 Release
Component:  Taxonomy             |     Version:  4.0
 Severity:  normal               |  Resolution:
 Keywords:  4.2-early has-patch  |     Focuses:
---------------------------------+-----------------------------

Comment (by valendesigns):

 Replying to [comment:50 theMikeD]:
 > I'm not after parent terms at all.

 I understand where you are coming from and you may not be after the parent
 terms, but others might. If we're going to add another parameter to
 `get_terms()`, shouldn't it at least be useful in more situations? Not
 just for one limited scenario where you add `false` to get the bottom
 terms. What is the utility here? I'm not trying to be argumentative for
 the sake of it, I'm just having a hard time seeing the value in this
 change as it's current presented. Could you please give me an example of
 how other developers could leverage this enhancement so I understand your
 point of view better?

 Replying to [comment:51 boonebgorges]:
 > I can see the use of a parameter like this, but it'd be a totally
 separate enhancement from 'childless'.
 In the description of this ticket it describes adding a parameter that
 does the opposite of `parent`, so shouldn't it live up to that a little
 bit more? As well, if we went that route and added a separate parameter
 (new ticket) wouldn't we be breaking up what is essentially one function
 set, as `parent` has already proven? If this stays named `childless` and
 we decide to proceed at some point in the future with that second
 enhancement merging the two would be confusing at best.

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


More information about the wp-trac mailing list