[wp-trac] [WordPress Trac] #21290: Post types continue to be selected after removal from custom taxonomy registration

WordPress Trac noreply at wordpress.org
Tue Nov 20 15:50:38 UTC 2012


#21290: Post types continue to be selected after removal from custom taxonomy
registration
--------------------------+---------------------------
 Reporter:  jondavidjohn  |       Owner:  jondavidjohn
     Type:  defect (bug)  |      Status:  reopened
 Priority:  high          |   Milestone:  3.5
Component:  Taxonomy      |     Version:  3.4.1
 Severity:  blocker       |  Resolution:
 Keywords:  revert        |
--------------------------+---------------------------
Changes (by nacin):

 * keywords:  has-patch commit => revert
 * priority:  normal => high
 * status:  closed => reopened
 * resolution:  fixed =>
 * severity:  normal => blocker


Comment:

 This broke one of our favorite things in the world: attachment taxonomies.

 An attachment taxonomy can be register not just to 'attachment', but to a
 particular mime type, like `attachment:image` or `attachment:video`.

 get_object_taxonomies() handles this, but only if it is passed a post
 object. At this stage in querying, we're obviously too early for that. So,
 when we come across the 'attachment' post type and do
 get_object_taxonomies( 'attachment' ), we don't get back any of the mime-
 type-specific taxonomies, and that causes us to avoid including
 'attachment' in the query.

 There *are* some potential fixes for this. Basically, we need an API that
 says "get me all attachment taxonomies", essentially looking for any
 object type that is either 'attachment' or starts with 'attachment:'.

 I'm at the point where we revert this for 3.5 and revisit it later.

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


More information about the wp-trac mailing list