Leftover Capabilities

Members 9 posts 3 voices

  1. Hi,

    I’m seeing left over roles from deactivated plugins.

    Is there a way to remove them please or is it okay to leave them there?

  2. Those are actually leftover “capabilities” rather than roles. The only way to remove them is to remove each capability from each role that has it. If no roles have the capability, the capability technically doesn’t exist. Therefore, it will not show in the list.

    It doesn’t hurt anything to leave them there, but it’s nice to clean them out once in a while.

  3. I have deleted all other roles that may have produced these capabilities leaving me with keymaster, club member, subscriber, and administrator( don’t see any other options there)….but they still get stuck there. But if they don’t do any harm, I don’t mind 🙂

  4. Don’t delete roles. You must remove the **capabilities** themselves from each role that has them.

  5. When you ‘EDIT’ Roles – there is a ‘delete’ function to delete the Role.. but there are no buttons to delete these leftover capabilities from deactivated Plugins.

    The only button is a checkbox = grant/deny

    How do you delete these leftover capabilites?

  6. Technically, you can’t delete capabilities. You can remove them or add them. Capabilities only exist if they are added to a role. So, if you remove these capabilities from any roles that have them, they’ll no longer appear.

    ***

    Side note #1: You could do this with any capability, even core WP caps. However, Members retains a backup copy of core WP caps in case someone removes them.

    ***

    Side note #2: I’ve thought about building an add-on plugin for capability management (Members is a role manager). I wasn’t sure how much interest there’d be in such a plugin though.

  7. Can you explain a bit on ‘Custom capability’.. there is a button to add this but after that – what..?

    thanks

  8. Please open new topics for separate questions. This is so that others searching in the future won’t get confused when looking for similar answers.

    A custom capability is for when you want to add a new capability to a role that doesn’t exist. There are 2 reasons for this:

    1) You’re writing some custom code and want to check if a user has this custom capability for whatever reason you have in mind.

    2) A plugin you’ve installed that requires you to add the capability and the capability is not listed.

  9. Please open new topics for separate questions. This is so that others searching in the future won’t get confused when looking for similar answers.

    A custom capability is for when you want to add a new capability to a role that doesn’t exist. There are 2 reasons for this:

    1) You’re writing some custom code and want to check if a user has this custom capability for whatever reason you have in mind.

    2) A plugin you’ve installed that requires you to add the capability and the capability is not listed.