[wp-trac] [WordPress Trac] #24386: Make _pad_term_counts work for non-post type objects and attachments

WordPress Trac noreply at wordpress.org
Wed May 22 18:23:31 UTC 2013


#24386: Make _pad_term_counts work for non-post type objects and attachments
-------------------------+-----------------------------
 Reporter:  TomAuger     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Taxonomy     |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 If you register a hierarchical taxonomy against a non-post object (such as
 users), or attachments that aren't associated with another post,
 _{{{pad_term_counts}}} does bubkus, due to the INNER JOIN on
 {{{$wpdb->posts}}}, and the check for 'publish' status (which is relevant
 for attachment post types).

 I'm suggesting an alternative approach would be to use $term->count, and
 eschew going back to the database altogether.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24386>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list