Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51517 closed defect (bug) (duplicate)

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

Reported by: peterwilsoncc's profile 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
4 years 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
4 years 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.