Support » Fixing WordPress » how to disable notifications for contributors

  • hi
    i have a blog with a few people which have the “contributor” role.
    whenever someone comment to the article they wrote, i am not getting any comment-email-notifications, and i they that they (The author) gets it instead.
    how can I make is so the only notifications that are sent will be to the main default email address that is configured in the blog, and not to anyone else?

    I do not want others (contributors) to see the information about my readers (IP address that is sent in the email and so on).


Viewing 11 replies - 1 through 11 (of 11 total)
  • is it too hard that i get no replies? 😮

    Can you provide some of the text received in one of the said emails…

    Makes it easier for me to narrow down which file handles it…

    Offhand, no idea…

    It’s not a common question, so it’s hardly a surprise there’s no replies… and 4-5 hours is hardly a long time to wait for a reply, this is a forum after all, not a chat room….

    I’ll help if i can though… 😉

    This is the email:

    New comment on your post #570 “XX”
    Author : MXX (IP: XX.144.32.13 ,
    E-mail :
    URL :
    Whois :


    You can see all comments on this post here:

    Delete it:
    Spam it:


    Is there a setting i’m missing, or do emails get sent by default?…

    I’ll take a look tomorrow once i’m more awake… 😉

    To note:

    Can be defined in a plugin, this means we can write behaviour for the function and wordpress will only step in if the function doesn’t exist…

    Line : 935 is where the function currently exists, but if you take a look at the link above you’ll see WordPress allows for this function to be defined inside a plugin.

    In theory it should be dead simple…

    Didn’t work out as easy as first thought…

    Perhaps a trade off would be to use something like this.

    Can look at this hook, should do the trick. You can also prune the $reply_to variable inclusion at the bottom to prevent viewing the commenter’s email address entirely.

    Also, if you’re using multiple themes and are allowing visitors to select their theme, make sure to include the function in all themes available.

    I tried the same method spiff, and as you wrote on your response in that thread, it’s untested.

    In theory you should be able to define the function, due to the if(function_exists(‘example’)) part…, but in my own attempts i found behaviour was not as expected…

    Errors “functions already declared” etc…

    Give it a shot by all means, i’d like to see it work, and if so i can compare with what i did to see where i went wrong…

    Correct, the code should be placed in a plugin, not in functions.php. My bad. See updated post. Tested now.


    I’m using version 2.9.1 and having these problems with email notifications sent to members. The members can see the persons email address and ip address who commented on their post. How can I disable both? Also “delete it and spam it” is listed at the bottom of the email just like the one that is displayed for “shaye”. How can I disable that too? Note: I don’t want to disable the notification feature I just want to remove “email address & ip address” plus “delete it and spam it” being sent to members.

    You pulled up a bit of an old thread, but it’s still relevant..

    I’m just off to bed now, but i’ll take a look at this for you tomorrow.

    I’ve learnt quite a bit since my older replies further up, so i might be able to make more progress now, no promises, but i will take a look at it again.


    Oh geez, i totally forgot about my reposnse here, i’ll take a look at this for you now..

    It’s actually looking pretty easy, but it’s going to be hard to test since i have no email on a local installation, and of course there’s no guarantee i’d get it right first time round..

    I’m going to see if i can figure out a way though..

    Take the code here, place it into a file, name it something with a php extesion, and place it in the plugins folder.

    For example: post_notify_replace.php

    Before you go and activate, look at the various lines of code and comment out the ones you don’t want… an example

    Line 31:

    //$notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";

    Try to focus on commenting out just the $notify_message lines..

    For the delete it and spam it links, you should comment out lines 61 – 63.

    // Example - ignore this line (work around a forum bug that loses tabbing on the first line)
    		//$notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
    	//$notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";

    Only downside is you will have problems if another plugin also tries to define that function aswell.

    Once you’ve commented the necessary lines, go ahead and activate it, and that’s it… (i could only do limited testing, but it seemed to work just fine)..

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how to disable notifications for contributors’ is closed to new replies.