0

Is there any way to allow a particular role (Contributors, in this case) to use one plugin, and one plugin only?

I would like them to be able to add images to a gallery when writing their post, but the gallery is a plugin that they have no access to.

I don't want them to have access to other plugins.

Thanks in advance for any help :)

Edit: I have added the capability to manage_options and users can now see the plugin that I want them to in the menu. But, when the user hovers over the item in the menu to expand the sub-menu, they cannot see the top two items that me (an admin) can see. Why is this? Is it a plugin related issue?

Also, I have been looking into the add_menu_page function - could this help me? I don't really understand where to put the code so if someone could help me out then that would be great. I'm not 100% on the parameters for it either.

They can also see some other plugins but I will probably just hide them from the menu so that they can't be seen by the user.

  • I'm not sure you mean to edit the plugin code or to use the plugin? – birgire Jun 15 '14 at 20:35
  • Sorry, it wasn't very obvious. I mean use. :) – Mattios550 Jun 15 '14 at 20:43
-1

To solve this you need to go into the main .php file for the plugin and have changed the required capability using add_menu_page.

I created a custom capability, added it to Contributors, and changed the .php file to allow users with that capability to view the menu.

  • plugin code should never be changed, unless you are ready to maintain it yourself. – Mark Kaplun Apr 20 '18 at 5:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.