Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request weblab#15 from szk11001/master
Only allow admins/editors to edit People taxonomies
  • Loading branch information
jmr06005 committed Feb 24, 2016
2 parents 69ada72 + b0a61dd commit 73263f7
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 73263f7

Please sign in to comment.