Clanbite Social Kit Since 1.5.0

clanbite_social_kit_render_mentions( string $content, int $author_id = 0 ): string

Turn @username in content into profile links, honouring each member's "who can @mention me" setting.

Safe on HTML: attributes and text inside links, code and pre blocks are left alone. Use it to make mentions work in your own content (the forums do).

Parameters

$content (string) Required

Text or HTML.

$author_id (int) Optional

Author, so privacy settings apply to the mentioned members (0 skips the check).

Default: 0

Returns

string

Defined in inc/functions-global.php

Changelog

VersionDescription
1.5.0Introduced.