Prevent blog authors from editing comments

By default, a user with the ‘author’ role can edit any comment made on any of his own posts. This is alright when you only have a handful of trusted authors.

In most cases though, you will want to allow authors to only edit their own comments. Here is a little snippet that achieves that (requires WordPress 3.1 or newer):

If you want to prevent authors from editing even their own comments, just remove this line from above:

if ( $comment->user_id != $user_id )

comments powered by Disqus