Opened 10 years ago
Closed 10 years ago
#31155 closed enhancement (duplicate)
register_taxonomy function does not check reserved taxonomies
Reported by: | sebastiaandegeus | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
the function register_taxonomy() in wp-includes/taxonomy.php does not check for reserved taxonomies. But later on this will cause malfunctions or unexpected behaviour and bugs.
I wrote a very simple patch that checks if any of the reserved taxonomies are being registered and if so it notifies the developer by _doing_it_wrong and WP_Error as a fallback.
Projects and plugins that are using reserved taxonomies in the wild will not break. But the developers will be notified via the logs or on their development environments where WP_DEBUG is true.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
But you're returning early and the taxonomy wouldn't be registered?
Co-Authors Plus uses an
author
taxonomy behind the scenes, which seems like a perfectly valid use that would be broken by this patch.