Skip to content

Instantly share code, notes, and snippets.

@parkr
Created November 12, 2013 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parkr/7425601 to your computer and use it in GitHub Desktop.
Save parkr/7425601 to your computer and use it in GitHub Desktop.
WordPress: Add photo/video upload capabilities to contributors.
<?php
function wpc_contributor_uploads() {
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}
if ( current_user_can('contributor') && !current_user_can('upload_files') ){
add_action('admin_init', 'wpc_contributor_uploads');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment