In current version of Wordpress (2.0.5) IP and e-mail address of poster are displayed to other
registered users (not only the poster of comment but anybody who's logged in). This
customization will hide IP address and email. Edit file wp-admin/edit-comments.php and place
this line somewhere at the top, with other PHP code:
<?php
global $user_level;
//
// Permission level + 1 who can see the posters' IP and E-mail
//
$allowed_user_level = 3;
?>
Then find this line:
<p><strong><?php _e('Name:') ?></strong> <?php comment_author() ?> <?php if
($comment->comment_author_email) { ?>| <strong><?php _e('E-mail:') ?></strong> <?php
comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' !=
$comment->comment_author_url ) { ?> | <strong><?php _e('URI:') ?></strong> <?php
comment_author_url_link() ?> <?php } ?>| <strong><?php _e('IP:') ?></strong> <a
href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php
comment_author_IP() ?></a></p>
and replace with:
<p><strong><?php _e('Name:') ?></strong> <?php comment_author() ?> <?php if
($user_level > $allowed_user_level && $comment->comment_author_email) { ?>| <strong><?php
_e('E-mail:') ?></strong> <?php comment_author_email_link() ?> <?php } if
($comment->comment_author_url && 'http://' != $comment->comment_author_url ) { ?> |
<strong><?php _e('URI:') ?></strong> <?php comment_author_url_link() ?> <?php } if
($user_level > $allowed_user_level) { ?>| <strong><?php _e('IP:') ?></strong> <a
href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php
comment_author_IP(); } ?></a></p>
That's it. The IP and e-mail of poster will be hidden from users with user_level below 3.
|