I am working on doubt solving WordPress theme here user posts their problems and mentor solve them but the issue is here users are only allowed to share the link where they want to receive solutions I want users to share their email as well if they want to receive solutions over the email but whenever put their email the function took their domain part and show as a link on the post.
What I am trying to implement here is the function auto-detect if the user put their email it adds mailto before the email and post like this mailto:someone@example.com.
function glat_save_new_problem() {
check_ajax_referer('company_new_job_ajax_nonce', 'security');
$location = isset($_POST['location'])
? sanitize_text_field($_POST['location'])
: '';
$valid = isset($_POST['valid'])
? sanitize_text_field($_POST['valid'])
: '';
$action = isset($_POST['btn_action'])
? sanitize_text_field($_POST['btn_action'])
}
Please help me to resolve it