#33622 closed defect (bug) (invalid)
Category counter is not working for attachment post type
Reported by: | JohnOak | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Taxonomy | Keywords: | |
Focuses: | ui, administration | Cc: |
Description
When registering a custom taxonomy for "attachment" post type:
register_taxonomy( 'test', 'attachment', [ "label" => "Test", "singular_label" => "Test", ]);
And setting taxonomy value for attachment file:
The count for items in registered taxonomy shows 0 (if there is 1 or more items it will still show 0 an this is the problem):
When clicking on count (that shows 0) opens Media Library with items that have this taxonomy value. And in here everything is just fine:
The problem is that wrong counter that should be fixed.
Bug was tested with clean WordPress install with no plugins and on clean Twenty Fifteen child theme.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Please have a look at the documentation of the
update_count_callback
parameter in the WordPress Codex: https://codex.wordpress.org/Function_Reference/register_taxonomy. This is by design.