WordPress authors have permission to edit others comments on their own post. How to disable this and still allow the authors to edit their published posts?
2 comments
Comments are closed.
WordPress authors have permission to edit others comments on their own post. How to disable this and still allow the authors to edit their published posts?
Comments are closed.
From quick look at code the likely permissions check for that is
edit_comment
capability inedit_comment()
function.Your options to remove that capability roughly are:
map_meta_cap
oruser_has_cap
if you need to achieve more elaborate logic (for example denying permission in context of specific comment, rather than comments in general)PS not sure if this will properly omit related parts of interface, might need to deal with that separately
Insert this code to your theme functions.php file: