[wp-trac] [WordPress Trac] #14877: Ability to create exclusive custom taxonomies

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 15 14:08:25 UTC 2010

#14877: Ability to create exclusive custom taxonomies
 Reporter:  benbalter    |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Taxonomy     |     Version:                 
 Severity:  minor        |    Keywords:  custom taxonmy 
 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

 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.

Ticket URL: <http://core.trac.wordpress.org/ticket/14877>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list