• Hi there,

    is it possible to change the capability that is needed to get to the settings of the plugin? Currently it’s ‘manage_options’, but I would like to use another one.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Havlik

    (@mtekk)

    What capability are you thinking of using instead of manage_options? As far as I am aware, the manage_options capability is the most appropriate one for dealing with options/settings pages. The plugin is not designed to allow 2nd or 3rd party code to change the capability required to manage the options/settings. So, unfortunately, there really is not a way to change the capability from manage_options unless you modify Breadcrumb NavXT’s files (which I strongly advise against).

    Thread Starter jillebehm

    (@jillebehm)

    Hi John,

    a lot of plugins use a filter so 3th parties can change the permissions.
    WP Rocket uses the following:

    
    if ( ! current_user_can( apply_filters( 'rocket_capacity', 'manage_options' ) ) ) {
    

    This way the default capability is ‘manage_options’, but I can change that by using the filter.

    Changing plugin/core files should never be done, so I totally agree with that.

    Plugin Author John Havlik

    (@mtekk)

    After surveying a couple of plugins by authors I respect, it looks like the popular thing to do now is to create a new capability specific for a plugin’s options pages. I’ll look into doing that for the next release and I am tracking this in the following GitHub issue: https://github.com/mtekk/Breadcrumb-NavXT/issues/234

    Thread Starter jillebehm

    (@jillebehm)

    Hi John,

    great, thanks for checking it out!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Permissions’ is closed to new replies.