[wp-trac] [WordPress Trac] #25082: register_taxonomy_for_object_type cannot be used with non-post types
WordPress Trac
noreply at wordpress.org
Mon Aug 19 14:05:02 UTC 2013
#25082: register_taxonomy_for_object_type cannot be used with non-post types
--------------------------+-----------------------------
Reporter: leewillis77 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.6
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
register_taxonomy_for_object_type checks that the object type is a
post_type object, and will not let you register the taxonomy for the
object type if it is not:
http://core.trac.wordpress.org/browser/trunk/src/wp-
includes/taxonomy.php#L475
During discussion with nacin on IRC relating to #11058 he suggesting
removing the get_post_type_object check from the new
unregister_taxonomy_from_object_type function since it didn't seem to be
sensible.
This ticket is open to investigate the restriction in
register_taxonomy_for_object_type and see if it can also be removed.
Patch attached in case the collective wisdom decides that it is
unnecessary.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25082>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list