how to assign more permission to wordpress author

I have installed jw player plugin so that users of my site could upload their videos. Right now, admin can only see jw player menu on the admin panel and he can only upload videos and use this plugin. I have created an author as author is able to add/edit/delete his posts. My problem is author cannot see and use this jw player plugin as he does not see that admin menu of this plugin. anybody tell me please how to assign more permissions to WordPress Author so that he could see this plugin Menu and use it,

thanks

1 Answer
1

I have not looked at this plugins code, but what you will need to do is locate the part of the code that applies to show only this menu to the admin (normally it looks something like:)

if ( current_user_can( 'manage_options' ) {
// some code stuff in here
}  

form there you should change the manage_options text to upload_files which is a defined capability for author role and above (or you could create a new capability which only applies to author role). Creating a new capability is probably the best option in my opinion as then you could target specifc trusted authors to have permissions to the menu by assigning that new capability to username.

This should do as you require but be warned any update to the plugin by the plugin author will override this so for each time the plugin is updated you will have to re-apply this slight modification.

Leave a Comment