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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.