Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 933
Vlad Rovner Avatar asked Feb 07 '26 12:02

Vlad Rovner


1 Answers

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.

like image 186
sujumayas Avatar answered Feb 09 '26 02:02

sujumayas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!