[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
Tue Dec 30 22:12:50 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: 4.2
Component: Taxonomy | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------
Comment (by theMikeD):
Replying to [comment:61 boonebgorges]:
> Leaving open for the time being because I'm still not bonkers about the
'childless' naming convention.
I'd like nothing more than to reset the option names for `get_terms` for
consistency but we all know that will never happen. So we work with what
we have.
`get_terms` is using mixed metaphors in its options: `parent` and
`child_of` for parent-child metaphor, and `exclude_tree` for the tree
metaphor. `childless` seems clear to me, but even if we switch it to
something like `leaf` or `leaf_only` it's not going to change the fact
that we can't turn `only_terms_that_have_no_children` into a one or two
word option that will be 100% clear to everyone. That's what the docs are
for.
Changing it at this point seems to be a distinction without a difference.
Having said that, I'm not the gatekeeper so if it's decided that
`childless` is not good, then lets sort out what *is* good. I've provided
some alternatives in comment 27 and went with the best of that bunch. If
anyone has any alternatives, I'm all ears. But lets be sure, because I
don't want to have to do an option name change for a fourth time if it can
be avoided.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29839#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list