Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Created February 14, 2014 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kovshenin/9005034 to your computer and use it in GitHub Desktop.
Save kovshenin/9005034 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: No-IP
Plugin URI: http://wordpress.org/support/topic/37363
Description: Causes WordPress to NOT save the IP address from ANY commenter. WordPress will instead record all comment IP addresses as '127.0.0.1'
Author: WP-Forums
Author URI: http://wordpress.org/support/
Version: 0.1
*/
function zap_ip($ip) {
return '127.0.0.1';
}
add_filter('pre_comment_user_ip', 'zap_ip');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment