Vlad Rovner
Vlad Rovner

Reputation: 194

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.

Upvotes: 3

Views: 5040

Answers (2)

sujumayas
sujumayas

Reputation: 100

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.

Upvotes: 2

xSea
xSea

Reputation: 212

Try install this wordpress plugin. hope it help your solve your problem without coding it urself
https://wpfront.com/user-role-editor-pro/

purchase a license of this https://wordpress.org/plugins/admin-menu-editor/ allow you to add extra capabilities. You can even change naming of your admin menus/submenus many extra features :) I can only tell you its totally worth it

Upvotes: 2

Related Questions