[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 16:19:24 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 |
--------------------------+---------------------------
Comment (by nacin):
ocean90 reminds me we added get_taxonomies_for_attachments() in 3.5.
So, if $pt == 'attachment', use get_taxonomies_for_attachments(),
otherwise use get_object_taxonomies( $pt ). Seems salvageable foe 3.5.
We should probably introduce get_taxonomies_for_post_type() (or
_object_type()) at some point later, because having
get_object_taxonomies() take either a post object or a post type name is
confusing (and only for it to not work well for the 'attachment' post
type). Then, get_object_taxonomies() can primarily accept post objects,
while get_taxonomies_for_post_type() can accept post types. This gets
weird though, because it isn't obvious whether 'attachment' should auto-
expand the way _for_attachments() does.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21290#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list