Stop Turning URLs in Comments Into Links
Keeps web addresses typed in comments as plain text, so spam links are not clickable.
Opens WPIDE on
Code
add_action( 'init', function () {
remove_filter( 'comment_text', 'make_clickable', 9 );
} );
Notes
Links written as HTML anchors are not affected; use the "Strip HTML from comments" snippet for those.
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.