WP Advocate
Mailto URL displayed incorrectly in header (1 post)

  1. dufibo
    Posted 2 years ago #

    In the WordPress dashboard, I go to Appearance -> Customize. There is the section "Social Media Icons", with the field labeled "Enter your Mailto url". If I enter an email address here, then the email link is displayed in the header with "http://" prefix on the link. If I try to enter the email with "mailto:" prefix myself, the email link is not displayed. Problem is that the email is displayed by header.php with

    echo esc_url($email)

    but this should be something like

    echo esc_url('mailto:' . $email)

    and so you can keep validation using is_email($email).

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.