Clanbite Social Kit

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

Render 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) Required

Post, comment or forum HTML.

$author_id (int) Optional

Author 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

VersionDescription
1.5.0Updated.