# Send Comment Moderation Emails to Editors

> Sends "please moderate" comment emails to every editor as well as the site admin, so comments are approved faster.

- Type: PHP
- Runs: Run everywhere
- Category: [Email](https://wpide.com/library/category/email/)
- Tags: email, comments, moderation, editors
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/email-comment-moderation-editors/

## Code

```php
add_filter( 'comment_moderation_recipients', function ( $emails ) {
    $editors = get_users( array( 'role' => 'editor', 'fields' => array( 'user_email' ) ) );

    return array_values( array_unique( array_merge( (array) $emails, wp_list_pluck( $editors, 'user_email' ) ) ) );
} );
```

## Notes

Editors must have an email address on their profile.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Send Comment Moderation Emails to Editors" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
