Radcliffe 2: Improve the performance of the antispambot email masking

This commit is contained in:
Danny Dudzic 2019-11-13 00:34:11 +01:00
parent 4019e2673a
commit ff504f5db3

View file

@ -7,7 +7,7 @@ function radcliffe_2_contact_info( $section ) {
$location = get_theme_mod( 'radcliffe_2_contact_info_location', 'header' );
$address = get_option( 'site_contact_info' )['address'] ?: get_theme_mod( 'radcliffe_2_contact_info_address', '' );
$phone = get_option( 'site_contact_info' )['phone'] ?: get_theme_mod( 'radcliffe_2_contact_info_phone', '' );
$email = get_option( 'site_contact_info' )['email'] ?: get_theme_mod( 'radcliffe_2_contact_info_email', '' );
$email = get_option( 'site_contact_info' )['email'] ?: antispambot( get_theme_mod( 'radcliffe_2_contact_info_email' ), '' );
$hours = get_theme_mod( 'radcliffe_2_contact_info_hours', '' );
// If Address, Phone, Email and Hours are empty, return.
@ -75,9 +75,9 @@ function radcliffe_2_contact_info( $section ) {
<?php if ( $email || is_customize_preview() ) : ?>
<span class="contact-info-email">
<a href="mailto:<?php echo antispambot( sanitize_email( $email ) ); ?>">
<a href="mailto:<?php echo sanitize_email( $email ); ?>">
<?php echo radcliffe_2_get_svg( array( 'icon' => 'mail', 'title' => esc_html__( 'E-mail', 'radcliffe-2' ) ) ); ?>
<span class="contact-info-label"><?php echo antispambot( sanitize_email( $email ) ); ?></span>
<span class="contact-info-label"><?php echo sanitize_email( $email ); ?></span>
</a>
</span>
<?php endif; ?>