• Resolved budhajeewa

    (@budhajeewa)


    How to allow non-admins (editors, authors) to use certain WordPress plugins?

Viewing 2 replies - 1 through 2 (of 2 total)
  • David Gard

    (@duck_boy)

    The minimum level required is usually hard-coaded into the plugin.

    Open the main file of the plugin you want to change access rights for and search for ‘manage_options’. Chances are it will be in a function called either add_options_page(), add_submenu_page() or add_menu_page(). This basically means that the link to access the plugin will not be displayed to users who cannot ‘manage_options’.

    To allow Editors to access the plugin, change all occurances of ‘manage_options’ to ‘edit_pages’.
    To allow Authors to access the plugin, change to ‘publish_posts’.
    To allow Contributors to access the plugin, change to ‘edit_posts’.
    To allow Subscribers to access the plugin, change to ‘read’.

    Note though, that any change will be wiped out when you update the plugin in the future.

    For more information of Roles and Capabilities see the WordPress Codex.

    Thread Starter budhajeewa

    (@budhajeewa)

    @duck__boy: Thanks a lot. You’r guide helped me.

    Although replacing manage_options with other phrases didn’t help, I found a variable called view_level in the plugin code, which was set to administrator after I changed that to contributor, it all worked the way I wanted.

    I guess the way authors limit their plugins to user levels, varies with each plugin.

    A Thought: Wouldn’t it be nice if core WP can offer us an option to change user access level in plugins page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to allow non-admins (editors, authors) to use certain WordPress plugins?’ is closed to new replies.