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); if ($contactstext) {echo '<div class="contactstext">'.eae_encode_emails($contactstext).'</div>';}
- The topic ‘Possible to find plain text emails and wrap them into a tag?’ is closed to new replies.