Is there a bricks way to protect email adresses?

Hello,

how do you use the antispambot function to protect email adresses with bricks?

Thank you

I added this to the child functions but no success:

Not sure if it was an issue in older versions, but in v1.7.3 it is working

use this in rich text:

[antispam]your email[/antispam]

put this in functions.php


function protect_email_shortcode($atts, $content = null) {

$email = antispambot($content);

return '<a href="mailto:' . $email . '">' . $email . '</a>';

}

add_shortcode('antispam', 'protect_email_shortcode');
3 Likes