Don't Store Commenters' Browser Details
Stops WordPress from saving each commenter's browser user agent string with their comment, which is rarely needed and counts as personal data.
Opens WPIDE on
Code
add_filter( 'pre_comment_user_agent', '__return_empty_string', 20 );
Notes
Akismet still receives the user agent at submission time for its spam check; it is just not stored.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.