Anti-Spam Email Links

Hack or Fix 64 views
0 Flares 0 Flares ×

We all know that mailto links are a target for even the most simple bots. However there are things we can do to try to protect the mailto link from the bots getting hold of your email account and before you know it filling your inbox with spam!

	// Anti Spam Mailto Links
	// source:

function so_email_encode_function($atts, $content){
	return '<a href="'.antispambot($content).'">'.antispambot($content).'</a>';
add_shortcode('email', 'so_email_encode_function');
// Use shortcode [email][/email]

For Reference

Top 10 Snippets

Provided by: WP Daily
Tagged with: ,
Posted in Wordpress


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.


Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×