Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only allow admins/editors to edit People taxonomies
  • Loading branch information
szk11001 committed Feb 24, 2016
1 parent 52d5e70 commit b0a61dd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions uc-people.php
Expand Up @@ -56,7 +56,13 @@ function create_custom_custom_post_type(){
),
'public' => true,
'hierarchical' => true,
'rewrite' => array('hierarchical' => true )
'rewrite' => array('hierarchical' => true ),
'capabilities' => array (
'manage_terms' => 'manage_categories', // Only admins and editors can manage, edit, and delete
'edit_terms' => 'manage_categories',
'delete_terms' => 'manage_categories',
'assign_terms' => 'edit_posts'
)
)
);
register_taxonomy( 'persontag', 'person',
Expand All @@ -73,7 +79,13 @@ function create_custom_custom_post_type(){
'new_item_name' => 'Tag.newitemname'
),
'public' => true,
'hierarchical' => false
'hierarchical' => false,
'capabilities' => array (
'manage_terms' => 'manage_categories', // Only admins and editors can manage, edit, and delete
'edit_terms' => 'manage_categories',
'delete_terms' => 'manage_categories',
'assign_terms' => 'edit_posts'
)
)
);
}
Expand Down

0 comments on commit b0a61dd

Please sign in to comment.