[wp-trac] [WordPress Trac] #35886: get_taxonomy_parents function instead/inside get_category_parents
WordPress Trac
noreply at wordpress.org
Sat Feb 20 13:31:18 UTC 2016
#35886: get_taxonomy_parents function instead/inside get_category_parents
------------------------------------------+------------------------------
Reporter: hosein71 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.4.2
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------------------
Changes (by swissspidy):
* keywords: => needs-patch needs-unit-tests
Comment:
Hey there,
Thanks for creating this ticket and welcome to trac!
I think you mean ''terms'', not ''taxonomies'', though. You'd want to get
the parents of a specific term. Basically, a taxonomy is a way to group
things together. The names for the different groupings in a taxonomy are
called terms. 'category' and 'tags' are the two default taxonomies in
WordPress.
This means the function should be called something like
`get_term_parents()`. A `$taxonomy` parameter is not needed, as a term ID
is unique and we can get its taxonomy name from there. That's why the
`$taxonomy` parameter is optional for `get_term()` as well.
Besides that, would you mind creating a proper patch with your suggested
changes? See https://make.wordpress.org/core/handbook/tutorials/working-
with-patches/ for more information.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35886#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list