Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

comments_tags_to_links()

Description

Parse a comment and replace and add links to any user tags

Parameters

ColumnTypeDefaultDescription
$text string The input text e.g. the body of the comment

Return

void

Location

include/comment_functions.php lines 112 to 118

Definition

 
function comments_tags_to_links($text)
    {
    global 
$baseurl_short;
    
$text=preg_replace('/@(\S+)/s''<a href="' $baseurl_short 'pages/user/user_profile.php?username=$1">@$1</a>'$text);

    return 
$text;
    }

This article was last updated 28th February 2021 15:05 Europe/London time based on the source file dated 10th February 2021 14:30 Europe/London time.