Developer Overview
BuddyPress Schedule Activity overviewPremiumGet BuddyPress Schedule Activity →
This section covers the technical details of BuddyPress Schedule Activity for developers who want to integrate with, extend, or customize the plugin.
Requirements
Section titled “Requirements”- WordPress 5.3+
- BuddyPress or BuddyBoss Platform (the plugin only boots when
class_exists( 'Buddypress' )is true) - PHP 7.4+
Plugin structure
Section titled “Plugin structure”buddypress-schedule-activity/├── buddypress-schedule-activity.php # Bootstrap: constants, activation hooks, deferred init├── uninstall.php # Cleans up activity meta on uninstall├── includes/│ ├── class-buddypress-schedule-activity.php # Core class: wires all hooks│ ├── class-buddypress-schedule-activity-loader.php # Hook registration helper│ ├── class-buddypress-schedule-activity-activator.php│ ├── class-buddypress-schedule-activity-deactivator.php│ ├── class-buddypress-schedule-activity-i18n.php│ └── admin/│ ├── class-bpsa-admin.php # Card-panel admin: menu + Overview/Support/License tabs│ └── views/ # shell, hub, overview, faq, license├── public/│ └── class-buddypress-schedule-activity-public.php # All frontend logic└── edd-license/ # EDD license managementThe admin surface is chrome and license only. The plugin has no settings page of its own; scheduling has no configurable options.
Initialization flow
Section titled “Initialization flow”The plugin is instantiated at plugins_loaded (priority 10), after confirming BuddyPress is active:
plugins_loaded (priority 10) └── run_buddypress_schedule_activity() └── new Buddypress_Schedule_Activity() ├── load_dependencies() # Require all class files ├── set_locale() # Register text domain ├── define_admin_hooks() # Register the BPSA_Admin card panel └── define_public_hooks() # All frontend behaviorScheduling flow
Section titled “Scheduling flow”Member submits activity form with schedule data └── bp_activity_posted_update (priority 9999) └── buddypress_schedule_activity_posted_update() ├── Verify nonce (buddypress-schedule-activity) ├── Verify post author ownership ├── Validate date (YYYY-MM-DD, real date, not past) ├── Validate time (H:MM or HH:MM) ├── Validate meridiem (am/pm) ├── Convert 12-hour time to 24-hour ├── UPDATE bp_activity SET date_recorded = future_datetime WHERE id = activity_id └── bp_activity_update_meta( id, '_bp_activity_status', 'scheduled' )
WordPress cron (every minute via 'buddypress_schedule_activity_publish') └── buddypress_check_schedule_activity_publish() ├── Check / set transient lock 'bpsa_publish_lock' (60s TTL) ├── SELECT activities WHERE date_recorded <= now AND meta = 'scheduled' ├── For each: UPDATE meta to 'publishing' (atomic - prevents duplicates) ├── DELETE '_bp_activity_status' meta (makes post visible) └── UPDATE date_recorded = current UTC time (so post appears at top of feed)Data stored in the database
Section titled “Data stored in the database”| Table | Column / key | Value | Purpose |
|---|---|---|---|
{prefix}bp_activity |
date_recorded |
Future UTC datetime string | When the post should publish |
{prefix}bp_activity_meta |
_bp_activity_status |
scheduled or publishing |
Tracks scheduling lifecycle |
Text domain
Section titled “Text domain”buddypress-schedule-activity
Plugin constant
Section titled “Plugin constant”BUDDYPRESS_SCHEDULE_ACTIVITY_VERSION // '1.5.0'BUDDYPRESS_SCHEDULE_ACTIVITY_URL // plugin_dir_url() resultBUDDYPRESS_SCHEDULE_ACTIVITY_PATH // plugin_dir_path() resultBUDDYPRESS_SCHEDULE_ACTIVITY_FILE // __FILE__ of the bootstrapChecking if the plugin is active
Section titled “Checking if the plugin is active”if ( defined( 'BUDDYPRESS_SCHEDULE_ACTIVITY_VERSION' ) ) { // Plugin is active}
