Skip to content
This repository has been archived by the owner. It is now read-only.

Only allow admins/editors to edit People taxonomies #15

Merged
merged 1 commit into from Feb 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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