Skip to content

Instantly share code, notes, and snippets.

@aristath
Created May 18, 2018 07:55
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 aristath/99dac662352e141979e5ba0676e9fef4 to your computer and use it in GitHub Desktop.
Save aristath/99dac662352e141979e5ba0676e9fef4 to your computer and use it in GitHub Desktop.
Removes IP & UA tracking from bbPress
<?php
add_filter( 'bbp_current_author_ip', function() {
return '127.0.0.1';
} );
add_filter( 'get_post_metadata', function( $metadata, $object_id, $meta_key, $single ) {
if ( isset( $meta_key ) && '_bbp_author_ip' === $meta_key ) {
return '';
}
return $metadata;
}, 999, 4 );
add_filter( 'bbp_current_author_ua', '__return_empty_string' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment