@canimal
Thank you very much for your feedback and ideas! I really appreciate that ??
Enabling the plugin for other user rules is already possible as there is already a filter for that (see this link for code snippet: https://toolbarextras.com/docs/change-global-capability-for-toolbar-items-of-toolbar-extras/ ). With this you can set another capability and so also other user roles. However, then most likely you will have the problem that user roles with fewer permissions than admins will see nothing at all or very few additional items in the toolbar. The reason for this simple: the plugins and themes my plugin supports just require those admin permissions for almost all of their links. Even when I enable them for Editors, Authors etc. those users will get a permission error once clicking on them…
Adding additional permission conditions in the code of my plugin would bloat the codebase heavily and require A LOT more maintenance. It makes no sense at all.
However, this all said, what I want to do in future versions of the plugin anyways is this: add a new tab on my settings page called “Tools” – this will allow to disable and/or enable the toolbar for any user role — completely independent from the items my plugin adds (similar to many other plugins regarding the toolbar). Just an option to decide which user/user role can see/use the toolbar at all.
To better understand this whole thing and your special need I have these further questions:
– With which members/membership plugin are you working?
– Do they need the toolbar in frontend AND the admin or only one of those?
– How do you add your custom items to the toolbar – via code, or do you want that via a WP nav menu or any other?
This will help understand your use case better and make a better decision. Please feel free to give as many details as possible.
Thank you!