Created
April 2, 2015 00:52
-
-
Save uzegonemad/9ef4197fb37faa3dda43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wpbdp_form_field_html_value', 'alter_wpbdp_form_field_html_value', 10, 3); | |
function alter_wpbdp_form_field_html_value($value, $post_id, $class) | |
{ | |
// add tel: to phone numbers | |
if($class->get_id() == 6) // the ID of the field to modify | |
{ | |
$value = '<a href="tel:'.preg_replace('/[^0-9]/', '', $value).'">'.$value.'</a>'; | |
} | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment