Is it possible to find plain text emails and wrap them into a tag
-
Hello! Thank you for the plugin, I use it extensively.
On one of my sites there’s a custom field designed for all sorts of contact information, optionally including emails. These emails as the client is not very tech savvy will be most certainly put a plain text, without
<a href="mailto:">
tag. Therefore the question, is it possible to automatically find such emails in given text (for example, with eae_encode_emails function), wrap them ina
tags and then apply obfuscation. This is how it could work, on a simple text string:$contactstext = get_post_meta($post->ID, 'contactstext', true); //$contactstext = 'string... [email protected] ...string' if ($contactstext) {echo '<div class="contactstext">'.eae_encode_emails($contactstext).'</div>';} //$contactstext = 'string... <a href="mailto:OBFUSCATEDEMAIL">OBFUSCATEDEMAIL</a> ...string'
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Is it possible to find plain text emails and wrap them into a tag’ is closed to new replies.