Skip to content

Instantly share code, notes, and snippets.

@wpspeak
Last active December 19, 2015 03:39
Show Gist options
  • Save wpspeak/5892157 to your computer and use it in GitHub Desktop.
Save wpspeak/5892157 to your computer and use it in GitHub Desktop.
Anti Spam Mailto Links by Preventing Mail Scrapper Collecting the email
<?php
// Anti Spam Mailto Links
function email_encode_function($atts, $content){
return '<a href="'.antispambot($content).'">'.antispambot($content).'</a>';
}
add_shortcode('email', 'email_encode_function');
// Use shortcode [email][email protected][/email]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment