• Hello

    In the comment section (in the admin panel), it is can view the IPs of the users who comment on my site. And when the comment is made in a particular post, the author of this post can see the IP.

    But I’d like to know how not to display the IPs of users who comment on my site to those who do not have administrator level. Only the administrator can see the users’ IPs in the comments section.

    Could you explain how I get this?

    Thank you,
    Rodrigo

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Use the ‘get_comment_author_IP’ filter. Your filter callback would check if the current user has an admin capability or not. If not, return an empty string or “IP hidden” or similar. Otherwise just return the passed value.

Viewing 1 replies (of 1 total)

The topic ‘Hide comment IPs for non-Administrators’ is closed to new replies.