phpwordpressuser-rolescapability

Wordpress - Access to single plugin


I need to allow editor (role) to use "WP All Export" plugin. I`m trying to solve my problem using this code:

add_options_page('WP All Export Pro', 'All Export', 'edit_posts', 'pmxe-admin-manage', 'wp-all-export-pro_options');

But its not working for me... I'm a newbie in WP so any help will be appreciated.


Solution

  • As said in this post,

    You need to set the proper capability, third parameter in the add_option_page() function which you would have used to create the menu.

    http://codex.wordpress.org/Function_Reference/add_options_page

    So, what you need to do is set the correct capability.

    I think that capability is: 'manage_options'. (Look at line 145 here)

    But maybe it is pmxe-manage-options?

    The plugin registers the options page only when the user has that capability.