Skip to content

Instantly share code, notes, and snippets.

@MichaelConte
Created July 29, 2019 12:05
Show Gist options
  • Save MichaelConte/9ab654db040485cb0e85f6c6195fe5cb to your computer and use it in GitHub Desktop.
Save MichaelConte/9ab654db040485cb0e85f6c6195fe5cb to your computer and use it in GitHub Desktop.
Permit User to Upload Images
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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment