• Alright, so after all morning of searching how to modify WordPress to allow contributor to upload media I found nothing and decided to open some source files. I’m just posting my results here for the world to see.

    1) Open wp-admin/includes/dashboard.php – comment out 349 and 353
    2) Open wp-admin/media-upload.php – comment out 15-16
    3) Open wp-includes/general-tamplate.php – comment out 1508 and 1512 (on 1508 be sure to leave the closing ?> to end the php statement on 1511.

    That’s it (at least, I think that’s it). Hope this helps someone out there. Leave a quick post if it does. I’m just curious.

Viewing 16 replies (of 16 total)
  • The simplest way to do this is by placing the following code in your current theme’s functions.php file. I cover it in me detail in an article i wrote a little while back, Allowing WordPress Contributors to Upload Files.

    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');
    }
Viewing 16 replies (of 16 total)
  • The topic ‘Allow contributor to upload media’ is closed to new replies.