WordPress.org

Ready to get started?Download WordPress

Forums

How can I not let authors see emails and ip's (4 posts)

  1. GiaNtakos
    Member
    Posted 3 years ago #

    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)

  2. WebTechGlobal
    Member
    Posted 3 years ago #

    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.

  3. WebTechGlobal
    Member
    Posted 3 years ago #

    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>';
    		}
  4. WebTechGlobal
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic