[wp-trac] [WordPress Trac] #17548: wp_trash_post() does not call update_post_count()
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 1 12:57:52 UTC 2011
#17548: wp_trash_post() does not call update_post_count()
--------------------------------------------------+-----------------------
Reporter: joehoyle | Owner: ryan
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.3
Component: Taxonomy | Version: 3.2
Severity: normal | Resolution:
Keywords: has-patch dev-feedback needs-testing |
--------------------------------------------------+-----------------------
Comment (by joehoyle):
I have updated the patch to account for attachments, which does a sub
query if the term's taxonomy is registered for attachments.
This does not fix Matt's plugin, as he isn't adding the `attachment`
post_type to `post_tag` (or any other taxonomy). As the tax isn't added to
the post type (which I believe it should), when tags are added to the
attachment, it's doesn't fire the more complex query.
Also, Matt's plugin registers a new taxonomy "people", however it doesn't
look like this taxonomy is used anywhere. Suggested tags are stored as
post meta, and when they are approved, they get added as whatever taxonomy
you select (post_tag, category or post_format).
Once I added `register_taxonomy_for_object_type( 'post_tag', 'attachment'
);` to matt's plugin, term counts accounted for attachments (which used
the complex query).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17548#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list