Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 confused. What is the purpose of the grant parameter? What good would it do to add a capability to a user/role and not grant access to it when WordPress doesn't offer access to check if the capability is granted? The has_cap method only returns true or false.

At this point, it looks like the direction I should go is just create new Roles and either assign those roles to my users or not. The capabilities were going to be a "neat" way of me adding the custom capabilities without cluttering up the role list when manually adding a user. It looks like this won't work for me. Anyone confirm what I am reading/finding?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.