Title: Tests wrong capabilty
Last modified: May 10, 2021

---

# Tests wrong capabilty

 *  Resolved [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [5 years ago](https://wordpress.org/support/topic/tests-wrong-capabilty/)
 * It tests: edit_comment
 * This is a [known capability](https://wordpress.org/support/article/roles-and-capabilities/#edit_comment),
   but this seems outdated / unused, the plugin “User Role Editor” does not show
   it.
 * IMHO it should test for: “moderate_comments”, which in turn requires “edit_posts”.
   So basically it should test for both of them.
 * Hope this helps,
 * Tim

Viewing 1 replies (of 1 total)

 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [5 years ago](https://wordpress.org/support/topic/tests-wrong-capabilty/#post-14425713)
 * Hi Tim, thanks for your thoughts.
 * The test for `edit_comment` is used in the function `wp_notify_moderator` in 
   wp-includes/pluggable.php. See [https://developer.wordpress.org/reference/functions/wp_notify_moderator/](https://developer.wordpress.org/reference/functions/wp_notify_moderator/)
 * This plugin hooks into a filter used in this function and uses the same capability
   test. So there is logic here 😉
 * I’m not really sure why `edit_comment` is not in the Role table [https://wordpress.org/support/article/roles-and-capabilities/#capability-vs-role-table](https://wordpress.org/support/article/roles-and-capabilities/#capability-vs-role-table)
   but it might be because this capability is actually context related. Interesting.
   I’ll have to test that 🙂
    -  This reply was modified 5 years ago by [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/).

Viewing 1 replies (of 1 total)

The topic ‘Tests wrong capabilty’ is closed to new replies.

 * ![](https://ps.w.org/comment-moderation-e-mail-to-post-author/assets/icon-128x128.
   png?rev=1112139)
 * [Comment Moderation/Notification Recipients](https://wordpress.org/plugins/comment-moderation-e-mail-to-post-author/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/comment-moderation-e-mail-to-post-author/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/comment-moderation-e-mail-to-post-author/)
 * [Active Topics](https://wordpress.org/support/plugin/comment-moderation-e-mail-to-post-author/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comment-moderation-e-mail-to-post-author/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comment-moderation-e-mail-to-post-author/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/tests-wrong-capabilty/#post-14425713)
 * Status: resolved