Hook to plugins admin settings

So this is my first run at a plugin. I built a “Toolbox” plugin for myself that I can add things to as I feel needed. Right now the plugin only has one feature and that is to create a new role named “Client”. What it does is makes a hybrid of the Administrator and Editor role. It is so the client cant update something or change the permalink settings, but still can create users (I made it so this role can not create an admin) and other things admins can do.

What I have come into as a problem is if a plugin has settings that are supposed to be for admin only but I want the “Client” to have access too as well. Use Yoast for example, what if this client has SEO knowledge so doesnt want me to do their SEO for them, how can I give them access to the Yoast settings? I know when I include ACF into themes I can use

// Hide ACF field group menu item
add_filter('acf/settings/show_admin', '__return_false');

to hide the Custom Fields menu in the admin panel.

My overall goal is to have a list of checkboxes of my most used plugins (I do my best not to use many) that I can check to give them access. I just dont know what I would need to hook to, to be able to do that.

Read more here: Hook to plugins admin settings

Leave a Reply

Your email address will not be published. Required fields are marked *