Home › Forums › Calendar Products › Events Calendar PRO › Email Obfuscation using antispambot() not working with tribe_get_organizer_email
- This topic has 6 replies, 5 voices, and was last updated 9 years, 5 months ago by
Jeff.
-
AuthorPosts
-
October 15, 2016 at 10:52 am #1177230
Jeff
ParticipantHello,
I was using the code below in my functions.php to obfuscate emails, but just recently it doesn’t seem to work:
function tribe_947096_obfuscate_organizer_email( $output ) {
return antispambot( $output );
}
add_filter( ‘tribe_get_organizer_email’, ‘tribe_947096_obfuscate_organizer_email’ );I found this code from this post:
Email obfuscation in single event view with Email Address Encoder?
Tried <?php echo antispambot(‘testemail.com’); ?>
and that works just fine as a stand alone so I don’t think it’s antispambot that is the problem.The code here doesn’t seem to work properly when the filter is active:
“><?php echo esc_html( tribe_get_organizer_email() ) ?>I’ll attach an image of the output, but here is the underlying html code result. This is expected, but this is also what’s displayed to the user:
alisontamucci@gmail.comHere is a link to the page:
http://a82.dd7.myftpupload.com/event/basic-seminar-ithaca-new-yorkOctober 15, 2016 at 10:57 am #1177232Jeff
ParticipantSorry, in the code before I forgot the semicolons. But adding them didn’t help and this code doesn’t work either:
“><?php echo esc_attr(tribe_get_organizer_email()); ?>October 15, 2016 at 11:14 am #1177233Jeff
ParticipantWait a minute. Did you automatically add the email obfuscation now so that I don’t need the extra code in the functions.php file? It appears as if that’s what happened. I like the feature, just wasn’t aware of it. Am I correct?
October 15, 2016 at 7:25 pm #1177325Mathew
ParticipantJeff,
Yes, TEC 4.3 now includes obfuscation of the organizer email addresses, so you can safely remove the custom function. It’s in the /src/template-tags/organizer.php file.
October 17, 2016 at 9:17 am #1177714Nico
MemberHey Jeff,
Thanks for getting in touch with us, and Mathew thanks for jumping in 🙂
Indeed the antispambot is by default used by the function, as Mathew indicates above.
Please let me know if there’s anything else I can help you with,
Best,
NicoNovember 8, 2016 at 8:35 am #1189135Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Email Obfuscation using antispambot() not working with tribe_get_organizer_email’ is closed to new replies.
