Skip to content

Instantly share code, notes, and snippets.

@seoagentur-hamburg
Last active December 27, 2016 15:35
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 seoagentur-hamburg/a91e140476ac42fdbf73ca97231ddf9b to your computer and use it in GitHub Desktop.
Save seoagentur-hamburg/a91e140476ac42fdbf73ca97231ddf9b to your computer and use it in GitHub Desktop.
Spam save eMail address with wp shortcode
<?php
//Ab hier kopieren
/**
* Spamsichere E-Mail-Adresse mit WP-Shortcode
* @author Andreas Hecht
* @return E-Mail-Link
*/
function ah_mail_shortcode() {
$content = '
<script type="text/javascript">
document.write("<p><a href=\"mailto:office@andreas-hecht.com\">office@andreas-hecht.com</a></p>" );
</script>';
return $content;
}
add_shortcode( 'mailcode', 'ah_mail_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment