[wp-trac] [WordPress Trac] #15806: get_terms with hide_empty returns count > 0 with unpublished items

WordPress Trac noreply at wordpress.org
Fri Aug 19 16:05:16 UTC 2016


#15806: get_terms with hide_empty returns count > 0 with unpublished items
------------------------------------------------+--------------------------
 Reporter:  bendog                              |       Owner:
     Type:  defect (bug)                        |      Status:  reopened
 Priority:  normal                              |   Milestone:  Awaiting
Component:  Taxonomy                            |  Review
 Severity:  normal                              |     Version:  3.0
 Keywords:  reporter-feedback needs-unit-tests  |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------

Comment (by boonebgorges):

 I can't reproduce the issue .[attachment:15806.diff] includes tests for a
 number of situations, all of which seem to work as expected: 'draft' posts
 are excluded, posts that transition from 'publish' to 'draft' are
 excluded, posts that transition from 'publish' to 'trash' are excluded.

 In [comment:12 his comment above], @ocean90 asked for details to
 reproduce. Specifically, it would be helpful to see the code used to
 register the post type and taxonomy.  If the post type is providing its
 own `update_count_callback`, then it needs to be responsible for its own
 resetting of term counts.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15806#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list