-
-
Save jimihenrik/762c2e5248f7210847e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hide commenters email and IP from non admins | |
function filter_comment_email( $email ) { return ''; } // you can return 'private' or something if you want | |
function filter_comment_author_IP( $ip ) { return ''; } | |
if (!current_user_can('administrator')) { | |
add_filter( 'comment_email', 'filter_comment_email' ); | |
add_filter( 'get_comment_author_IP', 'filter_comment_author_IP' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment