Encrypt Emails in WordPress with Cryptx
It is quite annoying this thing, spam. Especially if it`s email that we`re talking about. Despite that it is being illegal, spammers will do their best to send you emails without your permission. Their way is by having bots, and then spam email addresses that are found through your blog. So for this kinds of nasty behavior I suggest using Cryptx Plugin for WordPress, so you can go ahead and download, activate it.
After this you should see “Cryptx” under settings tab. You can here modify some settings, for example changing the “@” from emails addresses and the “dot(.)” with custom ones or convert emails to PNG images.
Also you can use it at templates with this code, but make sure to modify the parameters with your own values :
<?php
02 $mail="name@example.com";
03 $text="Contact";
04 $css ="email";
05 if (function_exists('cryptx')) {
06 cryptx($mail, $text, $css, 1);
07 } else {
08 echo sprintf('<a href="mailto:%s" class="%s">%s</a>', $mail, $css, ($text != "" ? $text :$mail));
09 }
10 ?>