class MentionsMentions handler.
class final
- Full name
Kernowdev\ClanbiteSocialKit\Social\Mentions
Constants
| Name | Value | Description |
|---|---|---|
MENTION_PATTERN | '/(?<![\w@])@([a-zA-Z0-9_-]+(?::[a-zA-Z0-9_-]+)?)/' | Mention pattern: @username or @team:slug or @group:slug Supports alphanumeric, underscores, hyphens. |
Methods
author_may_mention()Whether an author may @mention a member, by that member's privacy setting (Anyone, Friends, No one).maybe_notify_reply_recipient()Notify the post author (top-level reply) or parent comment author (nested reply).mentions_to_names()Replace @username in plain text with the member's display name (teams and groups with their name), as the feed shows them.notify_content_mentions()Notify the members @mentioned in content that lives outside the feed (forums, for example).parse_mentions()Parse mentions from content.process_comment_mentions()Process mentions in a newly created comment.process_post_mentions()Process mentions in a newly created post.register_social_reply_notification_type()Register social_reply for the notifications bell / profile UI.register()Register hooks.render_mentions()Render content with mentions as links.resolve_mentions()Resolve mentions to actual entities (users, teams, groups).search_mentionables()Search mentionable entities for autocomplete.
Defined in inc/Social/Mentions.php
Changelog
| Version | Description |
|---|---|
| 1.6.0 | Updated. |
| 1.5.0 | Updated. |