Hi @lljb3,
Thanks for using Alt Text Tools!
Right now only users who can manage_options have access, which effectively means Administrators. I think it’d be reasonable to open that up to Editors too, since Editors can already see all the same content — the tool just lists images, their alt text, and links back to the posts they’re in. We’d do that by changing our check to the edit_others_posts capability.
If Editor access is all you need, that change alone would do it — no User Role Editor config required on your end.
If you’re looking to give access to a different role, we have a couple of options: we could make the capability filterable (so you’d use a small code snippet), or set up a dedicated custom capability you could assign directly in User Role Editor (no code needed).
Could you tell me a bit more about your use case? That’ll help us make sure the update covers it.
Thread Starter
lljb3
(@lljb3)
Interesting!
We have multiple program websites built in WordPress in our non-profit that we maintain. Each program has a marketing team that logs in to make content changes. We recently moved their accounts to be under the Editor and SEO Manager role (Yoast SEO plugin created role), and I just add on to the SEO Manager role to hide WP Dashboard menu items that they would never use and it’s less visual clutter for them.
Something like a custom capability would be amazing, but just opening it up to the Editor role works too, honestly, since I can just add on capabilities to the Editor role as well for those teams.
Hi @lljb3,
Thanks for that additional info. We just released v0.4.0 which will let you take both approaches! 😊
(It should be available to update in about 6 hours.)
In User Role Editor, create a new manage_alt_text_tools capability. You can then apply that to users or other roles.
Or, if you’d like to give other users access, you can now use the nerdpress_alt_text_tools_cap filter. For example, to enable access for Editors, you can add this filter/code snippet:
add_filter( 'nerdpress_alt_text_tools_cap', function() { return 'edit_others_posts'; } );
Thanks for your feature request, and for using Alt Text Tools! 😁
Best,
Andrew