简体   繁体   中英

Best way to add a WordPress plugin's options to a non-admin user's menu

I often configure WordPress installations for less-technical people and find that the first important task is to remove unnecessary items from the admin panel, however this becomes increasingly-difficult to manage when plugins get enabled and the "locked-down" users need access to its functions.

Generally, I create a new Role from scratch (using members plugin) and disable things from there.

The problem is that to allow a locked-down user to access the settings for a plugin (to add an item to their admin menu) I generally have to find the add_menu_page function and change the capability to one I know the locked-down user will have which, while good for allowing users access based on capabilities, makes little sense when I just want to allow the Role access to the menu.

More importantly, however, I dislike having to edit a plugin's code; particularly as it requires readjusting with each plugin update. Is there a cleaner way to achieve this or am I just approaching this issue in the wrong way?

我通过确定插件需要哪种功能并将其添加到角色中来解决了这一问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM