Email obfuscation with Email Address Encoder?

Home Forums Calendar Products Events Calendar PRO Email obfuscation with Email Address Encoder?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #942224
    Anders
    Participant

    Hi,

    I guess it is considered polite not to open others threads, so I will just link to it here:

    https://theeventscalendar.com/support/forums/topic/how-to-obfuscate-email-in-single-organizer-view/#post-897458

    My question is the same as the original poster, but I am less smart, so I would need to know what exactly what I should drop in the functions-file?

    If it helps: Here is the information from the Plugin FAQ:

    How can I filter other parts of my site?

    If the content supports WordPress filters, register the eae_encode_emails() function to it: add_filter($tag, ‘eae_encode_emails’);.
    If the content is a PHP string, run it through the eae_encode_emails() function: $text = eae_encode_emails($text);.
    If you want to encode a single email address, use the eae_encode_str() function: <?php echo eae_encode_str(‘[email protected]’); ?>

    This plugin doesn’t encode the entire website for performance reasons, it encodes only the content of the following WordPress filters the_content, the_excerpt, widget_text, comment_text, comment_excerpt.

    #942225
    Anders
    Participant

    Sorry for that ugly formatting from the FAQ. Lets try this instead:

    How can I filter other parts of my site?

    If the content supports WordPress filters, register the eae_encode_emails() function to it: add_filter($tag, ‘eae_encode_emails’);.
    If the content is a PHP string, run it through the eae_encode_emails() function: $text = eae_encode_emails($text);.
    If you want to encode a single email address, use the eae_encode_str() function: <?php echo eae_encode_str(‘[email protected]’); ?>

    This plugin doesn’t encode the entire website for performance reasons, it encodes only the content of the following WordPress filters the_content, the_excerpt, widget_text, comment_text, comment_excerpt.

    #942297
    Barry
    Member

    Hi Anders,

    So our support for customizations and integrations with other plugins is fairly limited (and I’m not in a position to test this out for you), but judging by the FAQ entries you copied in here it looks as though adding this very short snippet to your theme’s functions.php file would do the trick:

    add_filter( 'tribe_get_organizer_email', 'eae_encode_emails' );

    Could be worth a shot 🙂

    #942347
    Anders
    Participant

    Thanks Barry, I can confirm that the code actually works.

    For anyone who might be reading this post:

    While the Email Adress Encoder Plugin does exactly what it’s saying (obfuscating the email adress so Spam robots can’t read it) it does not automatically convert those email addresses to hyperlinked Mailto: links. (Wether that is a feature or not, depends on what you are looking for and your other considerations, like possible performance impact etc. )

    For me, on this project, I needed a solution which also turned the plain email text into a mailto-link, so I ended up using the plugin WP Mailto Links, which does use JavaScript to protect the emailadresses, but does have a setting to convert plain text links to mailto links. If you make sure to check the whole body of the page it also works just fine with the organizer email and any other email addresses your clients might throw in there.

    #942385
    Barry
    Member

    Thanks for confirming Anders, I’m glad it worked (and thanks also for the added detail re WP Mailto Links).

    I’ll go ahead and close out this topic – but of course please don’t hesitate to post fresh questions if any other issues arise 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Email obfuscation with Email Address Encoder?’ is closed to new replies.