Skip to content

Instantly share code, notes, and snippets.

@glueckpress
Created April 28, 2018 09:51
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 glueckpress/74710e5954f12f4da164f810b7976529 to your computer and use it in GitHub Desktop.
Save glueckpress/74710e5954f12f4da164f810b7976529 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Comment without IP
* Plugin URI: https://gist.github.com/glueckpress/74710e5954f12f4da164f810b7976529
* Description: Removes a commenter’s IP address from new comments.
* Version: 0.0.1
* Author: Caspar Hübinger
* Author URI: https://profiles.wordpress.org/glueckpress
* License: GNU General Public License v3
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
defined( 'ABSPATH' ) && function_exists( 'add_filter' ) or exit;
add_filter( 'pre_comment_user_ip', '__return_empty_string' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment