1

I'm the admin of a WordPress multisite installation, and in most of the blogs I'm the person who created the blog in the first place, and therefore my email is the admin email address.

Because of this, I get all the comment moderation emails, which I'm able to filter with some email rules.

But I wanted to disable this mails in WordPress itself – with no success.

I'm aware of the option in Settings -> Discussion -> Email me whenever [x] Anyone posts a comment. So I tried to disable this option, but then the regular authors of posts do not get notified, which is a no go.

Does anyone have any suggestions? Is it even possible in WordPress to disable admin email notifications while still sending notifications to post authors?

1 Answer 1

2

you can make a plugin out of the following code that removes an email from the recipients list and network activate it

function wpse158530_filter_emails($emails,$cid) {

  if (count($emails) > 1) { // you don't want to remove yourself if you are the author as well as admin
  // based on http://stackoverflow.com/questions/17252880/remove-value-from-array-in-php
    if(($key = array_search(your email address, $emails)) !== false) {
      unset($emails[$key]);
    }
  }

  return $emails;
}

add_filter('comment_moderation_recipients','wpse158530_filter_emails',10,2);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.