WordPress.org

Support

Support » Plugins and Hacks » Hacks » Disable Author Delete media

Disable Author Delete media

  • TeqToo
    Participant

    @teqtoo

    I want the client I’ve created a website for, and to whom I have given limited powers as “Author” through the User Role Editor plugin to be able to upload media files to the media library, but NOT to be able to delete files already in there. The media library contains all the image files for the whole website!

    I found this post from a year ago: http://wordpress.org/support/topic/how-to-disable-media-delete-in-wordpress?replies=2. It sounds like this solution is exactly what I’m looking for, but I don’t know where to place this bit of code. Is it in functions.php or elsewhere?

Viewing 1 replies (of 1 total)
  • TeqToo
    Participant

    @teqtoo

    OK, I discovered where to put the code. I created a functions.php file for my child theme, and dropped that bit of code into it.

    However, it doesn’t seem to do the trick. All it does is hide the “Delete Permanently” link under the image description in the media library when the logged-in user is an Author. However, they can still delete images by ticking the checkbox and using the Bulk Actions panel to Delete, or by clicking Edit, then using the Delete Permanently link in the right hand sidebar. Is there any way to completely prevent an Author from deleting image files?

Viewing 1 replies (of 1 total)
  • The topic ‘Disable Author Delete media’ is closed to new replies.