As usual, i'm busy working on WordPress development and found something missing on the web (may be not much people needs it). So i dig into WordPress core for such information and write this down here in case someone find it useful. I found that WordPress will automatically convert all URL or Email addresses from string to HTML link for all comment text. This is good thing for some users but its not such a good thing for my project. Therefore, i wanted to disable it but couldn't find any resources around the web. So i decideto write this down in case someone like me who wished to disable WordPress automatic conversion of url addresses to html links on the comment text. It's pretty simple to disable this feature. You can remove this feature from WordPress by adding the following sentence to remove the automatic conversion.
remove_filter('comment_text', 'make_clickable', 9);
Once this is added into your plugin or function.php file in your template, WordPress will not automatic convert all URL it sees to HTML link on the comment text. Have fun 🙂
One thought on “Disable Automatic Conversion Of URL To HTML Link In WordPress Comment”
Comments are closed.