Skip to content

BuddyBoss forum — CLI notification fixes and admin auto-subscribe

Created 2026-05-12
Status implemented
Tags planinfrastructurepractice-platformbuddybosswp-cliforum-postingnotifications

Status: Implemented 2026-05-12

Full implementation details, debugging notes, and carry-forward rules are in the changelog: baseworks-changelog/CHANGELOG.md → entry dated 2026-05-12


Three deliverables implemented and deployed to practice.baseworks.com:

  1. bw-fix-cli-mentions.php (mu-plugin) — fires bb_new_mention notifications for @mentions embedded in CLI-inserted bbPress replies; also auto-subscribes Patrick (user_id=8) and Asia (user_id=2) to a topic when either is @mentioned in it.

    • Server: /home/u2_practice_bas/files/wp-content/mu-plugins/bw-fix-cli-mentions.php
    • Changelog repo: sites/practice.baseworks.com/mu-plugins/bw-fix-cli-mentions.php
  2. Skill template update — Mechanism B (forum reply)bb_create_subscription() added after do_action('bbp_new_reply', ...) to subscribe the reply author to the topic.

  3. Skill template update — Mechanism A (forum topic)wp_set_current_user() added at top; do_action('bbp_new_topic', ...) and bb_create_subscription() added after bbp_insert_topic() succeeds.


  • Two mu-plugin files was the original plan but the mention-fix and auto-subscribe-on-mention were combined into one file (bw-fix-cli-mentions.php) since the subscription code lives inside the CLI-only guard path.
  • No subscribe-to-all-topics hook. Replaced by two targeted triggers: (1) reply author subscribe, (2) @mentioned admin subscribe.
  • bb_create_subscription() is preferred over direct $wpdb->insert() — handles dedup internally with error_type='bool'.