Skip to content

Instantly share code, notes, and snippets.

@bewho
Forked from voneff/functions.php
Created October 10, 2018 01:40
Show Gist options
  • Save bewho/f3a7ace0d18cba0770647677c4f8028b to your computer and use it in GitHub Desktop.
Save bewho/f3a7ace0d18cba0770647677c4f8028b to your computer and use it in GitHub Desktop.
WordPress: Disable IP collection through WordPress comments
<?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