Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Yes, it works. However, the way it works is admittedly pretty counter-intuitive: when you change that setting it doesn’t replace the default required capability. Instead, it adds another capability check on top of it. So a user will only see the menu if they have both capabilities – the default one and the new one that you selected.

    The reason it works like that is that the plugin can’t fully replace the original capability. Sure, it can change the admin menu (and it does), but most plugins/themes/core admin pages have a second capability check in the code that displays the page. This check is usually hard-coded and you can’t change it without editing the source.

    I’m considering splitting the capability setting into two fields – a read-only field for the default capability and another one that functions like the current “required capability” field. Maybe that would be less confusing?

    Thread Starter Nikodemsky

    (@nikodemsky)

    While i understand the machanics(at least i think i do), then it should be rather replaced with “additional requirement” or something like that. Why? Because practically if plugin requires for example “manage_options” capability, which is reserved for admin, then it’s impossible to “show” plugin to user with lower role.

    Right now it might be useful, if you have several admins but if hierarchy in wordpress installation goes like Admin > Editor > Subscriber and editor needs to see at least one plugin, that by default requires “manage_options” capability, then it simply won’t work. Correct me if i’m wrong, but it’s the way as i see it now.

    I understand, that for this kind of things other “role editor” plugins are needed, but atm as you said this option is rather confusing. At least without additional explanation(tooltip maybe?).

    Don’t get me wrong – i really like your plugin and using it in multiple wordpress installations, but things like this should be clarified ??

    Plugin Author Janis Elsts

    (@whiteshadow)

    Update: The latest release splits the field into “required capability” and “extra capability” and also includes tooltips for both.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is the "Required capability" works for free version?’ is closed to new replies.