#44872 closed defect (bug) (fixed)
wp_list_categories: term name of 0 not output
Reported by: | joyously | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
Using a term name of '0' is probably a bad idea, but when it is legacy data, that's what you do.
I have a taxonomy called Ratings, with term names of 0, 0.5, 1, 1.5, etc. up to 5. The slugs have the word 'star' in them, like '0-star' and '3-star'.
When using wp_list_categories()
to show them all, the one with '0' is not output. Other methods of showing them, such as the menu admin page, the taxonomy admin page, and the tag cloud widget all show the '0' term. If I use the Edit term page, and change the '0' to '0-', it is then output with wp_list_categories()
.
Somewhere in the function, empty()
is causing a problem.
Change History (11)
#5
@
6 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
#6
@
6 years ago
- Keywords fixed-major added; needs-patch needs-unit-tests removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 4.9.9 consideration.
Note: See
TracTickets for help on using
tickets.
In 43605: