WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 8 months ago

#51517 closed defect (bug) (duplicate)

Allow post statuses other the `publish` to be included in term counts.

Reported by: peterwilsoncc Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: Cc:

Description

Currently term counts only allow for the post status publish to be included. As WordPress allows for custom public post statuses, it would be handy to be able to include them as in the count.

I can see multiple approaches:

  • A filter to allow developers to modify countable statuses
  • An argument when registering custom statues to indicate it's countable
  • An argument when registering custom taxonomies to indicate the statuses that are countable
  • None or the above/another approach

Change History (2)

#1 @jeremyfelt
12 months ago

I ran into this today (again) and wondered if there was a Trac ticket already. Only a couple days old! :)

Very much a +1 overall.

My immediate thought was to add a filter to _update_post_term_count() though I'd also be on board with an argument on register_taxonomy().

#2 @peterwilsoncc
8 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Turns out this is a duplicate of #38843, closing as such.

Note: See TracTickets for help on using tickets.