Home » Email Protect WordPress Plugin

Email Protect WordPress Plugin

Author: John Kolbert
Version: 1.0.1
Last Update: August 10, 2008
Compatibility: 2.3+, 2.5+, others not tested
Description: Automatically protects email address in posts, pages, and comments by converting them into safe alternatives (such as an images or obfuscated text) to prevent spam harvesters from collecting them. You can also use this in your templates by placing a simple PHP function in your t (read “Usage” for more info). Adjust settings and view “Read Me” under Email Protect in the Options/Settings page
WP-Extend: Coming Soon
Download Email Protect WordPress Plugin Version 1.0.1

Downloaded 118 times from this page

Features at a Glance
  • Automatically protect email addresses from spam harvesters in posts, pages, and comments
  • Obfuscate email addresses using text (myemail [at] example [dot] com) or images
  • Control email text replacement for the “@” sign and final period in emails
  • Control font, font color, background color, and border color of obfuscated email images
  • Convert any email address in your template into obfuscated text or images by inserting a simple function call into your pages
Extended Description

The Email Protect WordPress plugin protects email addresses from being harvested from spam robots by converting them into forms that aren’t recognized. With Email Protect you can choose to obfuscate your email addresses in text form or image form.

Want to see some examples?

Text Obfuscation:
myemail [at] example [dot] com

Image Obfuscation:

Email Protect allows you to chose the text that replaces the “@” symbol and the final period in the email addresses. If you chose image replacement you can chose the font, font color, background color, and border color of the replacement image. Email addresses in comments are always converted using text obfuscation.

You can also replace images manually in your templates by inserting a simple PHP function (see “Usage”, below).

Installation
1. Download “emailprotect.zip” and unzip it.
2. Upload the entire plugin folder to wp-content/plugins/ and activate from the Plugin administrative menu.
3. Before the plugin will work you must enter your settings under “Email Protect” in the “Settings” menu (also called “Options” in pre-2.5 WordPress versions)
Upgrading

Email Protect is fully compatible with the WordPress 2.5 automatic upgrade feature. If you chose not to use the automatic upgrade feature, disable the Email Protect plugin, delete your existing folder, upload your newly downloaded Email Protect folder, and reactivate the plugin.

Usage

Email addresses are automatically obfuscated in posts, pages, and comments. You can chose the obfuscation method (text or image) under the “Settings” menu. Email addresses in comments are always obfuscated using the text method.

To obfuscate an email address directly in a template file, enter a PHP code that mimicks the following style:

<?php if(function_exists('ep_email_protect')){ ep_email_protect($email, $type); } ?>

The $email variable holds your email address and the $type is an optional variable that can either be “text” or “image” depending on the type of obfuscation you want. If you don’t specify a type the default setting in the options menu is used. For example, if your email address is myemail@example.com and you want it converted into an image, you would enter the following into your theme’s template file:

<?php if(function_exists('ep_email_protect')){ ep_email_protect('myemail@example.com', 'image'); } ?>

If you wanted text obfuscation, simply change “image” to “text.” It is important to remember the single quotes around both the email address and the type in the above function. The function above is designed so that if you deactivate the plugin it will not break your theme.

Options Explained In-Depth


Email Protect Options page

Email Replacement Method Choosing “text” or “image” sets the default replacement obfuscation method for email addresses. This does not affect comments as they are always obfuscated using the text-based method. Also, if the template function is used it uses this method by default unless the user specifies otherwise
Replace “@” with: The text entered here replaces the “@” symbol in text obfuscated email addresses. I recommend [at] or something to allow a human to recognize that it is an email address.
Replace the final period with: This text replaces the last period to appear in the email address in text obfuscated email addresses. For example, if your email address is example@my.site.com, only the period between “site” and “com” will be changed. I recommend using [dot] or something similar.
Background, Font, and Border Colors The entered text here must be the 3 or 6 digit hex color code for your desired color. There are many hex color converters available for free. Each box changes the corresponding color in the image obfuscated email address.
Email Font You can chose from one of nine pre-defined fonts for your image obfuscated email address.


FAQs

Coming soon (as soon as someone asks a question!)

Version History
  • Version 1.0.1: minor bug fixes
  • Version 1.0: primary release on June 8, 2008
Copyright & Disclaimer

Copyright © 2008 by John Kolbert (aka Simply-Basic.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

6 Comments »

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Please read the comment policy before commenting.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.