[wp-trac] [WordPress Trac] #19471: Automatically support custom post types in category and tag archives

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 7 23:37:02 UTC 2011


#19471: Automatically support custom post types in category and tag archives
--------------------------+------------------------------
 Reporter:  chrisbliss18  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by scribu):

 Replying to [comment:5 nacin]:
 > Replying to [comment:4 scribu]:
 > > Isn't this what register_taxonomy_for_object_type() is for?
 >
 > #14589 — It was your change (over my objections).

 Yeah, I remember having something to do with it, but it was reverted along
 the way. There was probably a good reason for it, but I neither me nor
 nacin can remember what it was.

 Anyway, instead of using 'any', we could collect all the post types which
 have the current taxonomy in their 'taxonomies' property.

 Since you would need to call register_taxonomy_for_object_type()
 explicitly, this can be safely used for 'category' and 'post_tag' as well,
 not just for custom taxonomies.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19471#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list