anti_email_spam.php
16 years ago
default_encode.php
16 years ago
email_escape.php
16 years ago
hide_email.php
16 years ago
wp_antispambot.php
16 years ago
default_encode.php
24 lines
| 1 | <?php |
| 2 | if ( ! function_exists( 'default_encode' ) ): |
| 3 | |
| 4 | /** |
| 5 | * Default email encode method converting email to html entities |
| 6 | * @package Lim_Email_Encoder |
| 7 | * @param string $email the email to encode |
| 8 | * @param string $display the display showing on the page |
| 9 | * @param string $encode_display also encode the display |
| 10 | * @return string |
| 11 | */ |
| 12 | function default_encode( $email, $display, $encode_display ) { |
| 13 | $email = Lim_Email_Encoder::get_htmlent( $email ); |
| 14 | |
| 15 | if ( $encode_display ) |
| 16 | $display = Lim_Email_Encoder::get_htmlent( $display ); |
| 17 | |
| 18 | // return encode mailto link |
| 19 | return '<a href="mailto:' . $email . '">' . $display . '</a>'; |
| 20 | } |
| 21 | |
| 22 | endif; |
| 23 | |
| 24 | ?> |