[wp-trac] [WordPress Trac] #15806: get_terms with hide_empty returns count > 0 with trashed items
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 14 00:24:22 UTC 2010
#15806: get_terms with hide_empty returns count > 0 with trashed items
--------------------------+-------------------------------------------------
Reporter: bendog | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.0.2
Severity: minor | Keywords: taxonomy, custom post
--------------------------+-------------------------------------------------
Hi,
I ''think'' that's a bug.
I've defined a custom post type and a custom category taxonomy for it.
On my front end, i'm using get_terms with hide_empty to show the
categories of the existing custom post type.
get_terms does ignore unpublished posts but it seems to include trashed
item.
I have one category that is linked to only a trashed item and the function
includes it in the count.
I can't select 3.0.3 in the version dropdown but it happened on any 3.0.x
that I tried.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15806>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list