Support » Fixing WordPress » How can I not let authors see emails and ip's

  • Hello.

    I don’t want my authors to be able to see the email and ip addresses from the users that leave comments on their posts.

    How is that possible?

    (Authors can see commenters’ addresses on admin panel (/wp-admin/edit-comments.php)

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ve spent half an hour trying to locate where this is printed from.

    Can’t locate it but I’m guess it is the only way for something like this. Remove it from the code, issue there is, it will come back when you upgrade WordPress.

    This is actually bugging me. I’m doing searches in the entire WordPress installation for any code related to the comment list and nothing comes up.

    Line 467 in class-wp-comments-list-table.php

    Found it.

    This is the block you should look at…

    if ( $this->user_can ) {
    			if ( !empty( $comment->comment_author_email ) ) {
    				comment_author_email_link();
    				echo '<br />';
    			}
    			echo '<a href="edit-comments.php?s=';
    			comment_author_IP();
    			echo '&mode=detail';
    			if ( 'spam' == $comment_status )
    				echo '&comment_status=spam';
    			echo '">';
    			comment_author_IP();
    			echo '</a>';
    		}

    I think you can remove all of this…

    echo '<a href="edit-comments.php?s=';
    			comment_author_IP();
    			echo '&mode=detail';
    			if ( 'spam' == $comment_status )
    				echo '&comment_status=spam';
    			echo '">';
    			comment_author_IP();
    			echo '</a>';

    For all users.

    Or you will need to add a function to check the current logged in users permissions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I not let authors see emails and ip's’ is closed to new replies.