New Comment Notification Email mod
-
This should work (add your functions.php file):
function remove_sensitive_info( $text ) { // $text is the body of the email. Replace it or modify it to whatever you want return $text; } add_filter('comment_notification_text', 'remove_sensitive_info');
Thanks, I’ll give it a go.
I was looking for the same thing. I put that code in my functions, and it crashes the site. Undefined function “add_filter”. Is there supposed to be another set of brackets or something around that? Thanks for any help.
I tried this and it’s still showing the IP and email for me :/
Anyone have any ideas. That has to be possible.
@spacebrew If the code snippet crashes the site, it sounds like you may have a syntax error. Try using WP_DEBUG to diagnose the error.
@xberserker Can you share the code you have thus far? You’ll need to parse the existing comment text for the IP address and email and replace them with empty strings.
@daniel sure this is what I have so far. But not sure if it’s WordPress 3 ready or not .. been a while since I last tried anything. But I have this as a plugin and it does nothing right now to strip the comment email and IP from the email that gets sent out. So it’s a useless plugin I have disabled for the moment. If I can get this working I’ll add it as a plugin to the directory if people would find it useful.
[Code moderated as per the Forum Rules. Please use the pastebin]
Or maybe I’m doing this the hard way .. might be an easier way. But it has to be possible …
This has to be possible. Anyone have any input on this?
Sorry forgot I had to use pastebin. Here is what I have so far that isn’t working. I know others would benefit from this if we figured this out. Then I could submit this as a plugin for others to use.
Little help? lol
I’m sure others would find this useful. Can I get a hint at least?
Here is another thread I’ve found but no luck yet.
http://wordpress.org/support/topic/comment-notification-lookdesign-format-1?replies=9
Ah! Think I got it working! I’ll do some more tests and report back. But it isn’t showing the email or IP address in the email that gets sent out.
- The topic ‘New Comment Notification Email mod’ is closed to new replies.
(@bstapylton)
14 years, 2 months ago
I would like to know which file, or under which table/field I will be able to find the string that represents the template of the email that is sent to Authors when a new comment is made on one of their posts.
I plan to remove details like the Email of the user who made the comment, the IP and the whois link. Authors on my site really shouldn’t have access to that information.
Just a pointer on where to look would be great!