From 1dc52cb00521673efc2a4c2db0656457076146f4 Mon Sep 17 00:00:00 2001 From: Ultimate Member Date: Wed, 30 Dec 2015 20:59:36 +0200 Subject: [PATCH] Automatic clickable links in profile header bio --- core/um-actions-profile.php | 4 ++-- core/um-short-functions.php | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/um-actions-profile.php b/core/um-actions-profile.php index 90a6eed2..b3bf1a59 100644 --- a/core/um-actions-profile.php +++ b/core/um-actions-profile.php @@ -378,9 +378,9 @@
-
'); ?> +

') ); ?> - +
diff --git a/core/um-short-functions.php b/core/um-short-functions.php index 1df68aad..b4122214 100644 --- a/core/um-short-functions.php +++ b/core/um-short-functions.php @@ -34,7 +34,14 @@ $message = um_convert_tags( $message, $args ); wp_mail( $email, $subject_line, $message, $headers, $attachments ); } - + + /*** + *** @Convert urls to clickable links + ***/ + function um_clickable_links($s) { + return preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '$1', $s); + } + /*** *** @convert template tags ***/