[wp-trac] [WordPress Trac] #34413: calling register_taxonomy() multiple times will overwrite existing object types
WordPress Trac
noreply at wordpress.org
Fri Oct 23 13:19:21 UTC 2015
#34413: calling register_taxonomy() multiple times will overwrite existing object
types
--------------------------+---------------------------
Reporter: BjornW | Owner: drewapicture
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version: 2.6
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
--------------------------+---------------------------
Comment (by BjornW):
Whoops, didn't notice @danielbachhuber patch...
I've also added a patch which warns you what will happen if you call
register_taxonomy multiple times for the same taxonomy with different
object types. In the future it might be better to change this behavior by
checking the existance of the taxonomy and using
taxonomy_register_for_object_type to register nultiple object types to the
same taxonomy.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34413#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list