WordPress add user capability on plugin activation

In the situation below is a class with two methods which could be hooked to plugin (de)activation. The first gets the user with the same e-mail address as the website (settings->general) and adds a capability to that user. The second removes the capability from all users that have it.

 

Leave a Reply

Your email address will not be published. Required fields are marked *