The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Disable Author Delete media (2 posts)

  1. TeqToo
    Posted 2 years ago #

    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?

  2. TeqToo
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.