Classes 1
Earned_Popupclanbite-pointsMost awards happen on the server (a post is saved, a reaction is added) so the browser never hears about them. This class loads a small script that asks GET clanbite-points/v1/recent-awards for the member's newest ledger rows and shows each as one of Clanbite's shared popups (clanbite.toasts, so position and length are the site-wide setting). The wording comes from the message registry (Settings → Points → Messages).
Functions 16
clanbite_avatar_badge_html()clanbiteThe rank badge: a small shape (hexagon for hexagon avatars) at the avatar's lower right, holding the level icon or number.clanbite_avatar_filter_data()clanbiteFilter the resolved avatar data before any markup is built.clanbite_avatar_frame_svg()clanbiteThe avatar frame: a border in the avatar's shape plus the XP ring (track and progress arc) inside it.clanbite_avatar_hexagon_points()clanbitePoints of a point-up regular hexagon with rounded corners, as an SVG points list.clanbite_avatar_resolve_shape()clanbiteResolve the avatar shape for an entity type: an explicit override, else the Players / Teams / Groups setting.clanbite_avatar_shape_element()clanbiteOne SVG shape in an avatar's 100 x 100 coordinate space.clanbite_forums_notify_mentions()clanbite-forumsNotify the members @mentioned in a new topic or reply (needs Social Kit and Notifications; honours each member's privacy setting).clanbite_forums_render_content_html()clanbite-forumsForum content for display, with @username mentions turned into profile links.clanbite_get_avatar_badge()clanbiteData for an avatar's XP ring and rank badge.clanbite_locate_block_or_plugin_template()clanbiteResolve the template for a Clanbite route: a theme PHP file, then the block template, then the plugin's PHP loader.clanbite_points_message_definitions()clanbite-pointsMessages Points registers with Clanbite's message registry.clanbite_ranks_message_definitions()clanbite-ranksMessages Ranks registers with Clanbite's message registry.clanbite_ranks_message_template()clanbite-ranksWording for one of Ranks' messages, with its {placeholders} still in place.clanbite_ranks_rank_up_popup_enabled()clanbite-ranksWhether the rank-up popup is switched on (Clanbite → Settings → Ranks → Rank-up popup).clanbite_social_kit_message_definitions()clanbite-social-kitMessages Social Kit registers with Clanbite's message registry.clanbite_social_kit_message()clanbite-social-kitWording for one of Social Kit's messages with its placeholders filled in.
Hooks 19
clanbite_{type}_avatar_dataclanbiteFilters the resolved avatar data for one entity type (player, team, group).clanbite_avatar_badgeclanbiteFilters the XP ring / rank badge data of an avatar.clanbite_avatar_dataclanbiteFilters the resolved avatar data (shape, ring and badge visibility) for every avatar.clanbite_avatar_data_{context}clanbiteFilters the resolved avatar data for one context (for example forum, social_feed, user_nav).clanbite_avatar_progress_demo_valueclanbiteFilters a fixed progress value to draw when no real rank progress is available.clanbite_forums_content_display_htmlclanbite-forumsFilters forum topic or reply HTML just before it is sent to the page for display.clanbite_points_award_message_varsclanbite-pointsFilters the placeholder values used to build an award's popup wording.clanbite_points_earned_popup_enabledclanbite-pointsFilters whether the "points earned" popup is shown to a member.clanbite_points_recent_awardsclanbite-pointsFilters the awards returned to the browser (oldest first), for example to hide some actions from the popup.clanbite_points_recent_awards_limitclanbite-pointsFilters the most awards one request returns.clanbite_points_recent_awards_windowclanbite-pointsFilters how far back (in seconds) an award can be and still be announced.clanbite_ranks_rank_up_popup_enabledclanbite-ranksFilters whether the rank-up popup is shown.clanbite_team_challenge_rate_limitclanbiteFilters the per-IP hourly request limit for guest challenge endpoints.clanbite_team_challenge_remote_allow_httpclanbiteFilters whether plain-http remote sites may be contacted for challenges.clanbite_team_challenge_upload_max_bytesclanbiteFilters the maximum size of a guest challenge logo upload.clanbite.points.earnedToastPayloadclanbite-pointsFilters the options of a "points earned" popup before it is shown.clanbite.points.shouldShowEarnedToastclanbite-pointsFilters whether new awards are announced. Return false to stay silent for this batch.clanbite.popup.shouldOpenclanbiteFilters whether a Clanbite popup may open. Return false to keep it closed.clanbite.popup.toggledclanbiteFires whenever a Clanbite popup opens or closes, however it was triggered.
Messages 34
activity.friendsclanbite-social-kitAutomatic post on both members’ profiles when a friend request is accepted.activity.group_createdclanbite-social-kitAutomatic post when a member creates a group.activity.group_joinedclanbite-social-kitAutomatic post when a member joins a group.activity.rsvpclanbite-social-kitAutomatic post when a member replies to a match, group or event invitation.activity.team_createdclanbite-social-kitAutomatic post on a member’s profile when they create a team.activity.team_joinedclanbite-social-kitAutomatic post when a member joins a team.feed_toast.comment_failedclanbite-social-kitfeed_toast.delete_failedclanbite-social-kitfeed_toast.link_copiedclanbite-social-kitfeed_toast.replies_load_failedclanbite-social-kitfeed_toast.share_unavailableclanbite-social-kitShown when a member tries to share a post on a page that has no status composer.feed_toast.update_failedclanbite-social-kitfriend_request.messageclanbite-social-kitThe line under the title of a friend request.friend_request.titleclanbite-social-kitSent when someone sends a member a friend request.friends_panel.accept_errorclanbite-social-kitfriends_panel.accept_successclanbite-social-kitPopup on the profile friends settings after accepting a request.friends_panel.decline_errorclanbite-social-kitfriends_panel.decline_successclanbite-social-kitfriends_panel.ignore_errorclanbite-social-kitfriends_panel.ignore_successclanbite-social-kitfriends_panel.unignore_errorclanbite-social-kitfriends_panel.unignore_successclanbite-social-kitmention.message_commentclanbite-social-kitThe line under the title when the mention is in a comment.mention.message_postclanbite-social-kitThe line under the title when the mention is in a post.mention.titleclanbite-social-kitSent when someone @mentions a member in a post or comment.points_earned.combinedclanbite-pointsShown instead when several awards arrive together (one popup per point type).points_earned.defaultclanbite-pointsShown when a member earns points, unless the action below has its own wording.rank_toast.detailsclanbite-ranksShown under the heading.rank_toast.maxclanbite-ranksAdded after the line above when the member reaches the highest rank.rank_toast.nextclanbite-ranksAdded after the line above when there is a higher rank to aim for.rank_toast.titleclanbite-ranksThe bold first line of the popup a member sees when their rank goes up.social_reply.message_commentclanbite-social-kitThe line under the title when someone replies to a comment.social_reply.message_postclanbite-social-kitThe line under the title when someone replies directly to a post.social_reply.titleclanbite-social-kitSent when someone replies to a member’s post or comment.
Methods 14
Earned_Popup::enabled_for()clanbite-pointsWhether a member should see the popup.Earned_Popup::enqueue()clanbite-pointsLoad the popup script for signed-in members.Earned_Popup::is_available()clanbite-pointsWhether the popup can work at all: it needs Clanbite's shared popups and message registry (Clanbite 1.5+).Earned_Popup::is_supported()clanbite-pointsWhether Clanbite's popups are switched on for the site (the Notifications extension is on).Earned_Popup::latest_award_id()clanbite-pointsHighest ledger id for a member (0 when they have none yet).Earned_Popup::register_rest_routes()clanbite-pointsRegister the recent awards route.Earned_Popup::register()clanbite-pointsRegister hooks.Earned_Popup::rest_recent_awards()clanbite-pointsREST: the signed-in member's newest awards after a ledger id, with ready-to-show wording.Forums::notify_reply_mentions()clanbite-forumsNotify members @mentioned in a new reply.Forums::notify_topic_mentions()clanbite-forumsNotify members @mentioned in a new topic.Main::enqueue_interactivity_for_plugin_templates()clanbiteMake the Interactivity API available to blocks rendered by a Clanbite plugin's own PHP template.Main::load_textdomain()clanbiteLoad translations early (plugins_loaded, priority 1).Main::register_shared_styles()clanbiteRegister stylesheets shared by Clanbite and its companion plugins.Teams::get_team_description_for_form()clanbitePlain text for the description textarea.
REST API 1
clanbite-points/v1/recent-awardsclanbite-points