mitchelldmiller/quick-mail-wp-plugin — pull request #1 by lumpysimon (2014-12-01 18:42:03+00:00)
Title: Add filter 'quick_mail_user_capability' to the user capability check

I've added a filter called `quick_mail_user_capability` to the `add_submenu_page` call, that allows the user capability to be changed from the default `publish_posts`. It would be very handy if you would be happy to incorporate this.

In my case I only want users who can edit other users' posts to be able to send mails, so I just add the following code to `functions.php`:

add_filter( 'quick_mail_user_capability', 'my_quick_mail_user_capability' );

function my_quick_mail_user_capability( $capability ) {
return 'edit_others_posts';
}