Very easy to do this yourself.
Edit the plugin .php or create your own plugin and make these additions to the .php (additions contained in < strong > tags):
* Obfuscation routine
**/
static function obfuscate_shortcode($args)
{
//Get values from shortcode and put them in local variables
extract
(
shortcode_atts
(
array
(
'email' => false,
<strong>'phone' => false,</strong>
'linkable' => true, //0 if you want to store phones, names or other hidden information instead of emails
'link_title' => "",
'use_htmlentities' => true,
'use_noscript_fallback' => true,
'noscript_message' => __("Please enable JavaScript to see this field.", "email-obfuscate-shortcode"),
'tag_title' => ''
),
$args
)
//Init return variable
$ret = $email;
//Encode as htmlentities
if($use_htmlentities)
$ret = EOS::html_entities_all($ret);
<strong>//wrap in tel: link
if($phone)
$ret = '<a href="tel:'.$ret.'"'. ($tag_title != '' ? (' title="'. $tag_title .'"') : '') .'>'. ($link_title=='' ? $email : $link_title) .'</a>';</strong>
//Wrap in mailto: link
if($linkable)
$ret = '<a href="mailto:'.$ret.'"'. ($tag_title != '' ? (' title="'. $tag_title .'"') : '') .'>'. ($link_title=='' ? $email : $link_title) .'</a>';
Note: you can delete some of the code in the second addition, but it doesn’t hurt to leave it there. Perhaps the plugin author can provide a better code snippet?
Then you add the following shortcode to your post:
[email-obfuscate email=”tel:+01123456″ linkable=”0″ phone=”1″ link_title=”0123456″ ] Obviously replace the +01123456 with the right number ??
-
This reply was modified 8 years, 1 month ago by tombsc.