Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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