MainWP Community

Allow Contributor Users Upload Images

Allow contributor users to upload images of your child site.

Snippet Type

Execute on Child Sites

Snippet

if ( current_user_can('contributor') && !current_user_can('upload_files') )
add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
     $contributor = get_role('contributor');
     $contributor->add_cap('upload_files');
}
1 Like


Add media will now show on posts.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.