Created
November 9, 2013 16:18
-
-
Save wpspeak/7387006 to your computer and use it in GitHub Desktop.
Register a shortcode for WordPress antispambot function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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