render_mentions( string $content, int $author_id = 0 ): stringRender content with mentions as links.
Works on plain text and on HTML: only text is touched (never attributes, and never text inside links, code or pre blocks). Members who limited who may mention them (Privacy → @Mentions) stay plain text when the author may not mention them.
public static
Class: Kernowdev\ClanbiteSocialKit\Social\Mentions
Parameters
$content(string) RequiredPost, comment or forum HTML.
$author_id(int) OptionalAuthor of the content, so each mentioned member's privacy setting can apply (0 skips the check).
Default:
0
Returns
string Content with mention links.
Defined in inc/Social/Mentions.php
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Updated. |