Third-Party Integrations
Third-Party Integrations
Section titled “Third-Party Integrations”The plugin includes built-in integration code for the following third-party plugins. All integrations are loaded conditionally — none of the integration classes are instantiated unless the relevant plugin is active.
BuddyBoss Platform
Section titled “BuddyBoss Platform”BuddyBoss Platform is a fork of BuddyPress that ships its own activity, notifications, and forums subsystem. The plugin detects BuddyBoss with bp_anonymous_activity_is_plugin_active( 'buddyboss-platform/bp-loader.php' ) and adjusts:
- Avatar class.
bb-anonymous-gravataris appended to the anonymous avatarclassattribute so BuddyBoss styles apply correctly. - Subscribed-group notifications. Two BuddyBoss-specific filters (
bb_send_subscribed_group_notifications,bb_send_subscribed_group_email_notifications) block notifications that would reveal the poster’s identity. - Email tokens.
bb_email_set_original_tokensis filtered (bp_anonymous_activity_set_original_tokens) to replaceposter.namebefore BuddyBoss renders email bodies. - BuddyBoss notification avatar.
bb_notification_avatar_urlis filtered (bp_anonymous_activity_modify_notification_gravatar) to swap in the anonymous avatar URL on notifications sourced from anonymous activities. - Dark mode. CSS supports dark theme via
.bb-dark-themeselectors (inassets/css/bp-anonymous-buddyboss-forums.css).
No additional configuration is required. When BuddyBoss Platform is active the plugin automatically uses the BuddyBoss-specific template (bb-anonymous-activites-single-activity.php) for the anonymous activity permalink page.
BuddyBoss Forums (bbPress embedded in BuddyBoss)
Section titled “BuddyBoss Forums (bbPress embedded in BuddyBoss)”The Bp_Anonymous_BuddyBoss_Forums_Integration class handles anonymous posting in BuddyBoss Platform’s built-in forum component.
How it works:
- A checkbox is injected into topic and reply forms via
bbp_theme_after_topic_form_subscriptionsandbbp_theme_after_reply_form_subscription. - The forms use a MutationObserver in JavaScript (
assets/js/bp-anonymous-buddyboss-forums.js) to inject the anonymous checkbox into dynamically rendered reply popups (BuddyBoss loads reply forms via JavaScript, not on initial page load). - When a user submits a form with the checkbox checked, the handlers
handle_anonymous_topicandhandle_anonymous_replyfire onbbp_new_topic/bbp_new_reply(priority 10). The post’spost_authoris left as the real user ID. - Anonymous meta (
_bp_is_anonymous,_bp_anonymous_user_id,_bbp_anonymous_name,_bbp_anonymous_email) is written viaupdate_post_meta. - When BuddyBoss creates a BuddyPress activity item for the forum post,
transition_post_status(priority 5) marks that activity as anonymous. - Display filters on
bbp_get_topic_author_display_name,bbp_get_reply_author_display_name,bbp_get_topic_author_avatar,bbp_get_reply_author_avatar,bbp_get_topic_author_link, andbbp_get_reply_author_linkhide the real author.
Hooks available for this integration:
bp_anonymous_forum_before_checkbox— fires before the forum checkbox rendersbp_anonymous_forum_after_checkbox— fires after the forum checkbox rendersbp_anonymous_forum_topic_created— fires after meta is written on a new anonymous topic; parameters:$topic_id,$forum_id,$original_authorbp_anonymous_forum_reply_created— fires after meta is written on a new anonymous reply; parameters:$reply_id,$topic_id,$forum_id,$original_authorbp_anonymous_topic_activity_updated— fires after the BuddyPress activity entry for an anonymous forum topic is created/updated; parameters:$activity_id,$post_id,$activitybp_anonymous_reply_activity_updated— same but for forum replies
Post meta written:
| Meta key | Value |
|---|---|
_bp_is_anonymous |
true |
_bp_anonymous_user_id |
real user ID (int) |
_bbp_anonymous_name |
'Anonymous' |
_bbp_anonymous_email |
'anonymous@example.com' |
bbPress (standalone)
Section titled “bbPress (standalone)”The Bp_Anonymous_Bbpress_Integration class provides forum anonymity support for sites using standalone bbPress without BuddyBoss.
How it works:
- A checkbox is injected into new topic and reply forms via a simpler script (
assets/js/bp-anonymous-bbpress.js). - When a topic or reply is submitted with the checkbox checked, the post meta
_bp_is_anonymous,_bp_anonymous_user_id,_bbp_anonymous_name, and_bbp_anonymous_emailare set. _bbp_anonymous_nameis set to'Anonymous'and_bbp_anonymous_emailto'anonymous@example.com'to use bbPress’s own anonymous display logic.- The real author’s user ID is preserved in
_bp_anonymous_user_id.
Differences from the BuddyBoss Forums integration:
- Notification suppression hooks at priority 9 (
bbp_new_reply) and priority 9 (bbp_new_topic) — one step later than the BuddyBoss variant (which uses priority 1). - No
transition_post_statushandler (not needed without BuddyBoss’s activity bridge). - No
bbp_get_reply_author_roleorbbp_get_reply_revision_logfilters (these are BuddyBoss-specific).
The checkbox, meta keys, and the bp_anonymous_forum_* action hooks work identically to the BuddyBoss Forums integration.
Enable forums: Go to WB Plugins > Anonymous Activity > General and turn on “Allow Anonymous Posts in Forums”. The forums checkbox only appears when this option is yes.
Forum integration selection logic:
BuddyBoss active? └── Yes → Bp_Anonymous_Buddyboss_Forums_Integration (loaded on bp_init:20) └── No + bbPress active? → Bp_Anonymous_Bbpress_Integration (loaded on init:20) └── Neither → No forum integrationBP Verified Member
Section titled “BP Verified Member”When the BP Verified Member plugin is active and the “Allow Anonymous Activity for Verified Members” toggle is on (bp_anonymous_enable_verified = 'yes'), the plugin calls BP_Verified_Member::is_user_verified() for the current user before allowing anonymous posting.
- Unverified users will not see the checkbox anywhere — activity, comments, or forums.
- This check runs inside both
bp_anonymous_activity_enable()andbp_anonymous_activity_check_user_role(), so it applies consistently across all entry points. - No hooks are provided specifically for the Verified Member check. Use
bp_anonymous_activity_enableorbp_anonymous_activity_check_user_roleto override the result.
RTMedia
Section titled “RTMedia”When RTMedia is active, the plugin filters bp_get_activity_action_pre_meta (priority 999) to remove the secondary avatar RTMedia appends to rtmedia_update activity items in groups or friends context. Without this, RTMedia would render the real member’s avatar next to the activity even when the primary avatar has been replaced.
The bp_anonymous_activity_secondary_gravatar filter lets you supply a replacement avatar HTML instead of the empty string the plugin uses by default:
add_filter( 'bp_anonymous_activity_secondary_gravatar', function( $replacement, $original, $activity ) { return '<span class="anon-media-badge">Anonymous</span>';}, 10, 3 );BP Nouveau (BuddyPress template pack)
Section titled “BP Nouveau (BuddyPress template pack)”When the active BuddyPress theme package is nouveau (detected via get_option('_bp_theme_package_id')), the plugin uses the Nouveau-specific single-activity template and hooks bp_nouveau_get_activity_comment_action to hide anonymous commenter names.
The single-activity permalink template resolves to:
templates/activity/anonymous-activites-single-activity.phpYouzify theme
Section titled “Youzify theme”When the Youzify class is present (class_exists('Youzify')), the single-activity template is:
templates/activity/youzify-anonymous-activites-single-activity.phpThe plugin also enqueues Youzify-specific styles and scripts (Masonry, youzify-directories). No additional configuration is required.
Legacy / other themes
Section titled “Legacy / other themes”Any theme or template setup that does not match Nouveau, BuddyBoss, or Youzify uses the fallback template:
templates/activity/anonymous-activities-single-activity-legacy.phpChecking integration status in code
Section titled “Checking integration status in code”// Is BuddyBoss active?if ( bp_anonymous_activity_is_plugin_active( 'buddyboss-platform/bp-loader.php' ) ) { // BuddyBoss-specific logic}
// Is standalone bbPress active (not BuddyBoss forums)?if ( bp_anonymous_activity_is_plugin_active( 'bbpress/bbpress.php' ) ) { // bbPress-specific logic}
// Is BP Verified Member active?if ( bp_anonymous_activity_is_plugin_active( 'bp-verified-member/bp-verified-member.php' ) ) { // Verified Member integration active}bp_anonymous_activity_is_plugin_active() checks both site-active and network-active plugins, so it works correctly on WordPress Multisite.
EDD Licensing
Section titled “EDD Licensing”The plugin uses the Easy Digital Downloads software licensing updater (edd-license/edd-plugin-license.php). This connects to wbcomdesigns.com to check for and deliver updates when a valid license key is active.
The license key and status are stored in:
| Option key | Purpose |
|---|---|
edd_wbcom_bpanac_license_key |
Stored license key |
edd_wbcom_bpanac_license_status |
valid, expired, disabled, or empty |
The EDD updater is independent of plugin functionality — deactivating or omitting a license key does not disable any feature.
Previous: Hooks & Filters

