Email Obfuscate Shortcode
开发者 |
khromov
|
更新时间 |
2016年7月29日 06:41 |
PHP版本: |
3.0 及以上 |
WordPress版本: |
4.6 |
版权: |
GPL2 |
详情介绍:
Obfuscate your email address or other sensitive information with a shortcode to prevent harvesting of your data.
Version 2.0 includes an improved way of displaying the email without relying on JavaScript document.write();
Usage
Basic usage
[email-obfuscate email="bob@example.com"]
Setting custom link text
[email-obfuscate email="bob@example.com" link_title="Email Bob!"]
*Setting custom link title attribute"
[email-obfuscate email="bob@example.com" tag_title="Email Bob!"]
Using every available setting (this example shows their default values)
[email-obfuscate email="bob@example.com" linkable="1" link_title="" use_htmlentities="1" use_noscript_fallback="1" noscript_message="Please enable JavaScript to see this field."]
Usage from a template or plugin
Below is a snippet that you can use in any template or plugin to apply the same obfuscation to an email as using the shortcode:
if(function_exists('eos_obfuscate'))
{
echo eos_obfuscate(array('email' => $email, 'link_title' => 'Email Bob!'));
}
else
{
echo $email;
}
If the plugin is not enabled, the email address will just pass through and output in cleartext.
安装:
- Upload the
email-obfuscate-shortcode
folder to /wp-content/plugins/
- Activate the plugin (Email Obfuscate Shortcode) through the 'Plugins' menu in WordPress
- Use the shortcode in any post, page or custom post type.
屏幕截图:
更新日志:
2.0
- Improved way of displaying emails, using getElementByID and innerHTML(). This plugin is no longer dependent on document.write and can now be used when data is displayed via AJAX. Compatibility with major browsers should be unaffected.
1.3.3
1.3.2
- Added support for a tag title attribute via the tag_title="title" shortcode attribute.
1.3.1
- Fixed issue with additional space being added after email address. (Thanks to omdaddi)
1.3
- Fixed compatibility issue with PHP 5.2 (5.3 is still recommended)
- Fixed a bug that made use_htmlentities setting not work.
1.2
- Minor documentation fixes
1.1
1.0