Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* If you code a page template directly, you can add the function like so: */
- antispambot("youremail@yoursite.com");
- /* A way to take advantage of the antispambot() function within posts and pages content */
- // EMAIL ENCODE SHORTCODE
- function email_encode_function( $atts, $content ){
- return '<a href="'.antispambot("mailto:".$content).'">'.antispambot($content).'</a>';
- }
- add_shortcode( 'email', 'email_encode_function' );
- /* Code snippet goes in function.php file.
- Use the following structure to safely display an email address in your post or page content:
- [email]you@you.com[/email]
- */
Add Comment
Please, Sign In to add comment