Allow contributor role to upload images and not edit already published articles

I have the following two requirements:

  1. I want to allow users with the contributor role to upload media (images mostly) in their posts and preferably they shouldn’t be able to delete existing ones before submitting it for review.

    Read More
  2. I want to make sure once an article is published that it can’t be edited by the contributor (the writer of the plugin with user role contributor) or if it can be edited the newer version isn’t updated before going through a submission process.

I was recommended the Role Scoper plugin but I couldn’t figure out how to do it. Any information about any other plugin or how to do this in Role Scoper would be great.

Related posts

Leave a Reply

2 comments

  1. For image upload option to contributors

    Add this code in your current theme’s functions.php

    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');
    }