hide_empty still retrieves terms with only trashed posts with get_terms()
|Reported by:||sarahG111||Owned by:|
Using get_terms('taxonomy-slug', 'hide_empty=1'), I get a list of terms for live posts as well as terms with just trashed posts in.
You can see this happening if you go to view a taxonomy admin page where all of the terms are listed. On the right it gives the post count, and this includes trashed posts. I don't know if this uses get_terms() but it's basically the same idea/issue.
I'm not sure if this is expected behaviour but would assume that, despite the post still existing, if it's trashed then the term is essentially empty?