Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Just spotted a minor error in the shortcode, this is better:

    [email-obfuscate email=”+01123456″ linkable=”0″ phone=”1″ link_title=”0123456″ ] Obviously replace the +01123456 with the right number 🙂

    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 9 years, 8 months ago by tombsc.
    Thread Starter tombsc

    (@tombsc)

    Absolutely fantastic support! Thanks so much for your help.

    Feel free to log back in and fix the issues I’m having integrating woocommerce into my theme 😉

    Seriously though, best support ever – very much appreciated.
    Tom

    Thread Starter tombsc

    (@tombsc)

    Yes it does work when the plugin is disabled. Ill send you a log in
    Thanks

    Thread Starter tombsc

    (@tombsc)

    Thanks, the site is labotanica.com.au and the password is alycia

    If you like I can email you an admin sign in?

Viewing 5 replies - 1 through 5 (of 5 total)