WordPress: New user role which is ONLY allowed to manage media
The add_role function should give you what you’re looking for. Here’s an example of using it to add a new role that allows the user to upload and delete media: function wpse413985_add_role(){ /* Check if the role already exists, since we don’t need to add it again every time the site loads. */ if ( … Read more