• Resolved amonon

    (@amonon)


    I’m kind of using WP for a purpose that it wasn’t made for and I’m running into my first problem because on my blog I allow everyone to publish posts. Right now the author of the post is able to see the ip/email of those commenting on his post(s) so that he can mark it as spam or approve/disprove (since he owns the post).

    I’m using capabilities manager (to create custom role) and would like to disable IP/Email from non-admin. Is this possible? If not, then which file do I have to edit to remove it completely (from everyone)?

    What about disabling “Comment approval” thing? for non-admin? Is that possible?

Viewing 1 replies (of 1 total)
  • Thread Starter amonon

    (@amonon)

    Alright, thanks to Firebug and the command ‘findstr’ in dos I was able to locate the IP php file. Anyway here’s the solution in case some of you might find this post via google.

    It’s located in: wp-admin/includes/template.php
    search for:

    echo '">';
    comment_author_IP();
    echo '</a>';

    replace it with:

    echo '">';
    if ( current_user_can('manage_options') ) {
    comment_author_IP();
    }
    echo '</a>';

    or better yet, replace the entire block (starting with if ( $user_can ) with this:

    if ( $user_can ) {
    	if ( current_user_can('manage_options') ) {
    		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>';
    	}
    } //current_user_can
Viewing 1 replies (of 1 total)
  • The topic ‘Remove IP/Email from showing when a comment is waiting for your approval’ is closed to new replies.