[wp-trac] [WordPress Trac] #33622: Category counter is not working for attachment post type
WordPress Trac
noreply at wordpress.org
Mon Aug 31 11:24:40 UTC 2015
#33622: Category counter is not working for attachment post type
--------------------------+---------------------------------
Reporter: JohnOak | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Taxonomy | Version: trunk
Severity: normal | Resolution: invalid
Keywords: | Focuses: ui, administration
--------------------------+---------------------------------
Changes (by swissspidy):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
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.
> Because an attachment is a type of post, the default
_update_post_term_count() will be used. However, this may be undesirable,
because this will only count attachments that are actually attached to
another post (like when you insert an image into a post). This means that
attachments that you simply upload to WordPress using the Media Library,
but do not actually attach to another post will not be counted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33622#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list