A lightweight plugin to protect email addresses from email-harvesting robots by encoding them into decimal and hexadecimal entities.
This plugin hooks into the WordPress filters like the_content, widget_text and others (additional filters can be added). On each filter a quick (disableable) search for an @-sign is performed. If an @-sign is found, a (overridable) regular expression looks for plain text email addresses. Found email addresses are replaced with the return value of eae_encode_str() (changeable), which obfuscates the email addresses to protect it from being read by email-harvesting robots. This function is slightly faster than WP's built-in antispambot() and uses additional hexadecimal entities.
You cannot use Firebug, Web Inspector or Dragonfly, because they decode decimal/hexadecimal entities into plain text. To make sure email addresses are encoded, right-click/secondary-click the page, click "View Source", "View Page Source" or "Source" and search for any plain text email addresses.
You specify any valid callback function with the eae_method filter to apply to found email addresses: add_filter('eae_method', function() { return 'antispambot'; });
eae_encode_emails() function to it: add_filter($tag, 'eae_encode_emails');.eae_encode_emails() function: $text = eae_encode_emails($text);.eae_encode_str() function: <?php echo eae_encode_str('user@foobar.com'); ?>This plugin doesn't encode the entire website for performance reasons, it encodes only the content of the following WordPress filters the_content, the_excerpt, widget_text, comment_text, comment_excerpt.
You can override the pattern with the eae_regexp filter: add_filter('eae_regexp', function() { return '/^pattern$/'; });
Like this: add_filter('eae_at_sign_check', '__return_false');
Requires: 2.0 or higher
Compatible up to: 3.3.2
Last Updated: 2012-2-21
Downloads: 4,956
1 of 1 support threads in the last three weeks have been resolved.
Got something to say? Need help?