Opened 10 years ago
Last modified 5 years ago
#29586 new enhancement
Sync get_the_category_list with get_the_term_list
Reported by: | markoheijnen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5 |
Component: | Taxonomy | Keywords: | needs-patch needs-unit-tests |
Focuses: | Cc: |
Description
It would be great to have get_the_term_list()
support the same features get_the_category_list()
has.
I created a proof of concept patch what works. The only thing I hate is the part I need to specify that I want to have a list instead of a separator because when it's empty get_the_category_list()
assumes to show a list but get_the_term_list()
will then just show only the links.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
This would be pretty great. I'd feel more comfortable with it if either of these functions had any unit test coverage.
Moving the call to
get_category_parents()
intoget_the_term_list()
is problematic, becauseget_category_parents()
is compatible only with categories. This would probably have to be accompanied by a taxonomy-agnosticget_term_parents()
(withget_category_parents()
converted to a wrapper).