About this plugin
This plugin provides an unobtrusive yet efficient protection against email harvesters / spambots.
com”) without exposing them to spam email harvesters. The plugin takes care of the obfuscation, implementing a graceful degradation technique focusing on usability so as to protect your email addresses from harvesters while keeping them usable to your human visitors.
com</span>.
If javascript is available, it will display a clickable link and display the original email to the human user. Maximum usability, maximum protection.
Please rate the plugin if you like it.
Usage
Write your email addresses inside your posts and pages as usual. 9% of the time), the original email address will be displayed as a clickable mailto: link. For example:
com. How are you today?
will become
com.
Additionally, you can specify what the mailto: link should look like by sticking a parenthesis inside of which you put the visible link text, like this:
com(John Doe). How are you today?
will become
com.
You can also write the link yourself, with whatever markup you like. An anchor whose
visible text is not the address is kept exactly as you wrote it — classes, target, rel,
nested markup and all — and only loses its href until the script hands it back:
com">Get in touch</a>
will become
Get in touch.
An anchor whose visible text IS the address — what editors produce when you paste one
into the visual editor — is still replaced by the protected span above.
inside a theme
php for example), you can use the function safe_email() like this:
com');
Theme-safe alternative (plugin can be disabled)
php) and call that wrapper everywhere instead of calling safe_email() directly.
if (! function_exists( 'theme_safe_email' ) ) { function theme_safe_email( $email, $label = '' ) { $email = sanitize_email( $email ); if ( '' === $email ) { return ''; }
if ( function_exists( 'safe_email' ) ) { $payload = $email. == $label? '('.
$label. ')': '' ); return safe_email( $payload ); }
== $label? $label: $encoded_email; return '<a href="mailto:'. esc_attr( $encoded_email ).
'">'. esc_html( $link_label ). '</a>'; } }<h3>Contribute</h3>
com/pixeline/pixeline-email-protector