function rex_email_obfuscator($params) { global $REX; $content = $params['subject']; $javascriptmethod = $REX['ADDON']['email_obfuscator']['settings']['javascriptmethod']; $nojavascriptmethod = $REX['ADDON']['email_obfuscator']['settings']['nojavascriptmethod']; $atPos = strpos($content, '@'); if ($atPos === false || !$javascriptmethod && !$nojavascriptmethod) { // nothing to do return $content; } // wrap anchor tag around email-adresses that don't have already an anchor tag around them $content = make_clickable($content); // replace all email addresses (now all wrapped in anchor tag) with spam aware version $content = preg_replace_callback('`\\<a([^>]+)href\\=\\"mailto\\:([^">]+)\\"([^>]*)\\>(.*?)\\<\\/a\\>`ism', function ($m) { return encode_email($m[2], $m[4]); }, $content); // done! return $content; }
<?php $vcard_email = get_option('vcard_email'); $vcard_org = get_option('vcard_org'); $vcard_street = get_option('vcard_street'); $vcard_locality = get_option('vcard_locality'); $vcard_region = get_option('vcard_region'); $vcard_postal_code = get_option('vcard_postal_code'); $vcard_country = get_option('vcard_country'); $vcard_tel = get_option('vcard_tel'); if ($vcard_email || $vcard_org || $vcard_street || $vcard_locality || $vcard_region || $vcard_postal_code || $vcard_country || $vcard_tel) { echo '<dl class="contact_details">'; if ($vcard_email) { echo ' <dt>Email</dt> <dd>' . encode_email($vcard_email, '', 'email', 'mailto:') . '</dd>'; } if ($vcard_org) { echo ' <dt>Org</dt> <dd class="org">' . $vcard_org . '</dd>'; } if ($vcard_street || $vcard_locality || $vcard_region || $vcard_postal_code || $vcard_country) { echo '<dt>Address</dt> <dd class="adr">'; if ($vcard_street) { echo '<span class="street-address">' . $vcard_street . '</span><br/>'; } if ($vcard_locality) { echo '<span class="locality">' . $vcard_locality . '</span><br/>'; }
function combi1($x, $y, $z) { $a = myTruncate($x, 12, 10, $z); $email = encode_email($a, 'blabla', 123); show_gravatar($email, $y, 'pic', 'good'); return $a; }
<footer> © 2011-<?php echo date("Y"); ?> <br> Not affiliated with The Church of Jesus Christ of Latter-day Saints. <br> <a href="<?php echo TRELLO_BOARD; ?> " target="_blank">Site progress</a> <a href="https://github.com/mholt/ysaward" target="_blank">Source on GitHub</a> <a href="mailto:<?php echo encode_email(YSA_EMAIL); ?> ?body=%0D%0A%0D%0A(via%20YSA%20website)" target="_blank">Report an issue</a> </footer>
</div> <div class="body" data-url="/Impress" data-type="html" data-static="true"> <h1>Impress</h1> <p> Aurelian Hermand<br /> Graf-Johann-Str. 34<br /> 26723 Emden<br /> Germany </p> <p> Fon: +49 (0)151-15433354<br /> Fax: 01805-006534-1333 </p> <p> <?php echo encode_email('*****@*****.**', '*****@*****.**', ''); ?> <br /> <a href="http://www.html5pattern.com">www.html5pattern.com</a> </p> </div> <div class="body" data-url="/test/app">App</div> </div> </div> <script src="html5pattern/js/jquery-1.8.1.min.js"></script> <script src="html5pattern/js/modernizr-inputattributes.js"></script> <script src="html5pattern/js/jquery.push.js"></script> <script src="html5pattern/js/script.js"></script>