Skip to content

Instantly share code, notes, and snippets.

@wpspeak
Created November 9, 2013 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpspeak/7387006 to your computer and use it in GitHub Desktop.
Save wpspeak/7387006 to your computer and use it in GitHub Desktop.
Register a shortcode for WordPress antispambot function
<?php
//* Register a shortcode for WordPress antispambot function
function afn_hidemail($atts , $content = null ){
if ( ! is_email ($content) )
return;
return '<a href="mailto:'.antispambot($content).'">'.antispambot($content).'</a>';
}
add_shortcode( 'email','afn_hidemail');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment