[wp-trac] [WordPress Trac] #12035: Allow taxonomy privledges to be handled independently of categories
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 26 18:03:56 UTC 2010
#12035: Allow taxonomy privledges to be handled independently of categories
-------------------------+--------------------------------------------------
Reporter: dd32 | Owner: dd32
Type: enhancement | Status: accepted
Priority: normal | Milestone: 3.0
Component: Taxonomy | Version: 3.0
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by pampfelimetten):
Have been testing it with registering a hierarchical taxonomy, including
applying different capabilities to different classes. Works very fine up
to now, respect!
@scribu: My test code looks like this:
{{{
register_taxonomy( 'language', 'post', array( 'hierarchical' =>
true,
'update_count_callback' => 'xxx_update_language_term_count',
'label' =>
__('Language'),
'query_var' =>
true,
'rewrite' =>
array( 'slug' => 'language' ),
'manage_cap' =>
'xxx_manage_language_tag',
'edit_cap' =>
'xxx_edit_language_tag',
'delete_cap' =>
'xxx_delete_language_tag'
) );
function xxx_update_language_term_count($terms) {
_update_post_term_count( $terms ); // standard function
}
}}}
Next thing is to create the capabilities, for which I use a plugin, but I
suppose there is another way to add them via script.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12035#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list