Customizing Roles / Capabilities
-
Howdy Support,
Attempting to customize capabilities for a custom taxonomy on a CPT without relying on a plugin (i.e. RoleScoper).
It appears to be fairly straight forward to manage capabilities on post types created by hand, but can’t seem to figure out how to tie into existing post types.
We’d like to restrict the ability to add/edit taxonomies from the editor.
Here’s a starting point, which removes the ability to manage *all* categories throughout the backend, including for posts.
function remove_manage_categories_capabilities() { $role = get_role('editor'); $cap = 'manage_categories'; $role->remove_cap($cap); } add_action( 'admin_init', 'remove_manage_categories_capabilities' );
Thanks in advance!
—
mp? We’re running current versions of WP(4.1) and CPT UI(0.8.5)
? Tax set to hierarchical
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Customizing Roles / Capabilities’ is closed to new replies.