Created
May 23, 2018 08:21
-
-
Save voneff/03379c56d25c919fd57b5d194d266ab7 to your computer and use it in GitHub Desktop.
WordPress: Disable IP collection through WordPress comments
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
<?php | |
/** | |
* Remove IP collection in WordPress comments | |
* Source: http://www.wpbeginner.com/wp-tutorials/how-to-stop-storing-ip-address-in-wordpress-comments/ | |
*/ | |
function wpb_remove_commentsip( $comment_author_ip ) { | |
return ''; | |
} | |
add_filter( 'pre_comment_user_ip', 'wpb_remove_commentsip' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment