Skip to content

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 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-gravatar is appended to the anonymous avatar class attribute 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_tokens is filtered (bp_anonymous_activity_set_original_tokens) to replace poster.name before BuddyBoss renders email bodies.
  • BuddyBoss notification avatar. bb_notification_avatar_url is 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-theme selectors (in assets/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:

  1. A checkbox is injected into topic and reply forms via bbp_theme_after_topic_form_subscriptions and bbp_theme_after_reply_form_subscription.
  2. 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).
  3. When a user submits a form with the checkbox checked, the handlers handle_anonymous_topic and handle_anonymous_reply fire on bbp_new_topic / bbp_new_reply (priority 10). The post’s post_author is left as the real user ID.
  4. Anonymous meta (_bp_is_anonymous, _bp_anonymous_user_id, _bbp_anonymous_name, _bbp_anonymous_email) is written via update_post_meta.
  5. When BuddyBoss creates a BuddyPress activity item for the forum post, transition_post_status (priority 5) marks that activity as anonymous.
  6. 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, and bbp_get_reply_author_link hide the real author.

Hooks available for this integration:

  • bp_anonymous_forum_before_checkbox — fires before the forum checkbox renders
  • bp_anonymous_forum_after_checkbox — fires after the forum checkbox renders
  • bp_anonymous_forum_topic_created — fires after meta is written on a new anonymous topic; parameters: $topic_id, $forum_id, $original_author
  • bp_anonymous_forum_reply_created — fires after meta is written on a new anonymous reply; parameters: $reply_id, $topic_id, $forum_id, $original_author
  • bp_anonymous_topic_activity_updated — fires after the BuddyPress activity entry for an anonymous forum topic is created/updated; parameters: $activity_id, $post_id, $activity
  • bp_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'

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_email are set.
  • _bbp_anonymous_name is set to 'Anonymous' and _bbp_anonymous_email to '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_status handler (not needed without BuddyBoss’s activity bridge).
  • No bbp_get_reply_author_role or bbp_get_reply_revision_log filters (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 integration

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() and bp_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_enable or bp_anonymous_activity_check_user_role to override the result.

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 );

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.php

When the Youzify class is present (class_exists('Youzify')), the single-activity template is:

templates/activity/youzify-anonymous-activites-single-activity.php

The plugin also enqueues Youzify-specific styles and scripts (Masonry, youzify-directories). No additional configuration is required.


Any theme or template setup that does not match Nouveau, BuddyBoss, or Youzify uses the fallback template:

templates/activity/anonymous-activities-single-activity-legacy.php

// 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.


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