How to obfuscate email in single organizer view?

Home Forums Calendar Products Events Calendar PRO How to obfuscate email in single organizer view?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #897458
    Tony
    Participant

    I am using the Email Address Encoder plugin to obfuscate the email address displayed in the SINGLE EVENT VIEW. That was pretty easy by editing the organizer.php file. Now I’m trying to figure out how to do the same for the email displayed in the SINGLE ORGANIZER VIEW. It looks like the function below in single-organizer.php is grabbing the email address and I followed the trail in the template files but I couldn’t find a way to access the email address and run the Email Address Encoder function on it. Which template should I be editing for this? Or is there a function/filter I can add to my Functions file?
    echo apply_filters( ‘tribe_display_meta_group’, tribe_get_meta_group( $meta_group_id ) );
    The Email Address Encoder function works like this:
    $eae_email = eae_encode_emails($email);

    #897767
    Brian
    Keymaster

    Hi,

    I can help you out here. You do not need to edit templates for this.

    On the single organizer this function gets the email:

    function tribe_get_organizer_email( $postId = null ) {
    $postId = TribeEvents::postIdHelper( $postId );
    $output = esc_html( tribe_get_event_meta( tribe_get_organizer_id( $postId ), '_OrganizerEmail', true ) );
    return apply_filters( 'tribe_get_organizer_email', $output );
    }

    So you can use this filter

    tribe_get_organizer_email

    to obfuscate the organizer email.

    Let me know if you have any follow up questions.

    Thanks

    #929938
    Brian
    Keymaster

    Since there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to obfuscate email in single organizer view?’ is closed to new replies.