Ability to create exclusive custom taxonomies
|Reported by:||benbalter||Owned by:||nacin|
Custom taxonomies should have the option of toggling exclusivity, meaning the user should only be able to select one term at a time.
Currently, developers wishing to implement an exclusive custom taxonomy (and thus would prefer radio buttons rather than check boxes on the add/edit post pages) must remove the existing taxonomy meta box completely and build their own, simply to change the input type. This not only duplicates code and development effort, but has the potential to create security vulnerabilities when plugin developers stray from best practices, for example, when recreating the AJAX add term functionality.
Exclusive taxonomies are not uncommon in every day life and are even more common when one thinks about typical custom post type implementations (e.g., students->school year, employee->department, car->color, ice cream->flavor).
While the best implementation is uncertain, I propose the function register_taxonomy accept an optional 'exclusive' argument (similar to 'hierarchical') that would change the check boxes within the taxonomy meta box to radio buttons and would handle the POST accordingly.
Change History (55)
- Keywords custom taxonmy removed
- Type changed from enhancement to feature request
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
- Milestone set to Future Release
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:11 follow-up: ↓ 20 @sanchothefat — 4 years ago
- Cc sanchothefat added
comment:49 @helen — 23 months ago
- Keywords needs-patch added; has-patch needs-refresh removed
- Milestone changed from 3.7 to Future Release