1
vote
0answers
60 views

Purpose of Adding Capability to Role But Not Grant?

I am attempting to create a custom role upon activation of my plugin. Along with that role, I wanted to add new capability to that role to access later. Now, after reading the Codex, I am totally ...
1
vote
3answers
417 views

How to assign capabilities to user NOT to User Role

Is there any way to assign custom capabilities to user, I'm NOT talking about User Role. I'm running a multi author blog where I assigned user role of "Author" to all of my authors. But I need a ...
4
votes
2answers
778 views

Allow roles below admin to add subscribers only

I want to give a group of user types (Editor + a custom role) the add_users /create_users capability. The only catch is that I wanted to limit that capability to adding 'subscriber' type users only, ...
5
votes
1answer
824 views

Confusion with adding meta capabilities to a role after registering a Custom Post Type with corresponding 'capability_type' parameter

I got quite confused with Custom Post Type (CPT) 'capability_type' parameter and adding generated capabilities to a role. So I've got a CPT called 'external_role' registered as following: ...
6
votes
1answer
2k views

add_role() run only once?

I was surprised to discover that add_role() modifies the database and fails if the role already exists. There are two implications here, one first more serious than the other: 1) if you're in ...