WordPress.org

Ready to get started?Download WordPress

Forums

Extra or hidden capabilities not showing in members plugin (3 posts)

  1. Starejosel
    Member
    Posted 1 year ago #

    I am using the members plugin with the role manager enabled. When I show the various roles under the users menu, it gives a count of their capabilities. When I select a role to edit, it shows the capabilities of the role--however, it shows fewer capabilities than the number shown in the count. The more capabilities the role has, the greater the number of hidden capabilities. Is there a way to show the hidden capabilities? Why are they there?

    Thanks!

  2. Andrew Tegenkamp
    Member
    Posted 1 year ago #

    I know this is old but I was curious about this myself and dug into it a little bit...

    It appears that the plugin hides the WordPress 1.x capabilities of level_0 => level_10. It goes up for each level because the higher level has a higher level so Admins get all 11 and Subscribers just get 1 (level_0) for example. It's based on the mapping shown on http://codex.wordpress.org/Roles_and_Capabilities#User_Levels and kept for backwards compatibility reasons.

    If it's bugging you, you can fix it by showing level_0 => level_10 in the Capabilities list. To do this, look at the plugin file /includes/capabilities.php and find the remove_filter that looks like this:

    remove_filter( 'members_get_capabilities', 'members_remove_old_levels' );

    Then take that and copy it into your theme's functions.php file because if you just un-comment it (or comment out the add_filter at the top of the file) you will lose changes in the next plugin update.

    If you're not using those levels (and you should not be since they are from Version 1.x!) and just want to get rid of them, you could temporarily do that in the plugin file and then go through each role and uncheck level_0 => level_10 for the built in roles, and the put the plugin file back.

    HTH,
    Andrew

  3. bobbingwide
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic