[wp-trac] [WordPress Trac] #37728: hide_empty doesn't work correctly in get_terms when no taxonomy specified
WordPress Trac
noreply at wordpress.org
Fri Aug 23 15:32:37 UTC 2019
#37728: hide_empty doesn't work correctly in get_terms when no taxonomy specified
-------------------------------------------------+-------------------------
Reporter: smerriman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Taxonomy | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
reporter-feedback needs-testing |
-------------------------------------------------+-------------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => 5.3
Comment:
I've reproduced the inconsistency by writing a couple of tests.
IMO it's somewhat odd semantically that 'hide_empty' would return empty
parents with non-empty children. But this is the historical behavior of
hide_empty, so it should be matched when `$taxonomies` is empty. So the
fix looks correct.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37728#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list