Send Comment Moderation Emails to More People
Sends "comment awaiting moderation" emails to extra addresses, such as your community manager, besides the site admin and post author.
Opens WPIDE on
Code
// Extra recipients for moderation emails.
$wpide_extra_moderators = array( '[email protected]' );
add_filter( 'comment_moderation_recipients', function ( $emails ) use ( $wpide_extra_moderators ) {
return array_values( array_unique( array_merge( (array) $emails, array_filter( $wpide_extra_moderators, 'is_email' ) ) ) );
} );
Notes
Emails are only sent while "A comment is held for moderation" is ticked in Settings > Discussion.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.