mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Automatic clickable links in profile header bio
This commit is contained in:
@@ -378,9 +378,9 @@
|
||||
|
||||
<div class="um-meta-text">
|
||||
<?php if( um_get_option( 'profile_show_html_bio' ) ) : ?>
|
||||
<?php echo strip_tags(um_filtered_value('description'), '<p><a><img><br><strong><b><em><i><quote><sub><sup>'); ?>
|
||||
<?php echo um_clickable_links( strip_tags( um_filtered_value('description'), '<p><a><img><br><strong><b><em><i><quote><sub><sup>') ); ?>
|
||||
<?php else : ?>
|
||||
<?php echo wp_strip_all_tags( um_filtered_value('description') ); ?>
|
||||
<?php echo um_clickable_links( wp_strip_all_tags( um_filtered_value('description') ) ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
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])?)?)@', '<a href="$1" class="um-link" target="_blank">$1</a>', $s);
|
||||
}
|
||||
|
||||
/***
|
||||
*** @convert template tags
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user