Integrations
BuddyPress Schedule Activity detects several third-party plugins and themes and adjusts its behavior automatically. This page documents those integrations and how to work with them.
BuddyBoss Platform
Section titled “BuddyBoss Platform”When buddypress()->buddyboss is set, the plugin:
- Renders additional HTML for the scheduling form via
bp_activity_post_form_options(at priority 999), in addition to the clock icon dropdown. - Replaces
<span>tags in the navigation label with plain text (BuddyBoss strips HTML from nav labels). - Uses
bb_nouveau_get_activity_entry_bubble_buttonsinstead ofbp_nouveau_get_activity_entry_buttonsto limit the buttons shown in the Scheduled Posts view to only the delete action. - Uses
bp_core_time_since(three-parameter version) instead ofbp_activity_time_sincefor displaying the scheduled date/time. - Dequeues
bp-livestampon the Scheduled Posts tab to avoid time-since conflicts.
Youzify
Section titled “Youzify”When the Youzify class is found, the plugin:
- Moves the clock icon from
bp_activity_post_form_optionstobp_activity_post_form_tools(Youzify’s hook for tool icons). - Stores a
_bp_schedule_activity_title_for_youzifymeta flag on scheduled activities. This is used by theyouzify_activity_new_post_actionfilter to set the action string to “posted an update” (Youzify otherwise shows an empty or incorrect action for scheduled posts). - Modifies the delete tool array via
youzify_activity_toolsto use Youzify’s expected CSS classes for the delete button on scheduled posts. - Fires
youzify_after_adding_wall_postafter a post is successfully scheduled.
Reign Theme (Wbcom Designs)
Section titled “Reign Theme (Wbcom Designs)”When REIGN_Theme_Class exists, the plugin adds bp_core_time_since filtering (same as BuddyBoss) to display “Scheduled for: [date]” instead of a relative “time ago” on the Scheduled Posts tab.
The delete button logic also accounts for Reign Theme: the plugin checks get_option( 'template' ) against reign-theme and BuddyxPro to decide whether to preserve additional buttons beyond the delete action.
rtMedia
Section titled “rtMedia”When RTMedia is active, the plugin checks rtmedia-options[privacy_enabled]. This setting changes how the plugin hides scheduled posts from the public feed:
- Privacy disabled (default,
nullorfalse): Usemeta_querywithNOT EXISTSon_bp_activity_statusto exclude scheduled posts from the feed. - Privacy enabled (
true): Use aWHERE NOT EXISTSSQL subquery added viabp_activity_get_where_conditionsinstead ofmeta_query. rtMedia’s privacy system overridesmeta_queryfiltering, so the WHERE clause approach is required.
The bp_activity_has_more_items filter is also adjusted when rtMedia is active on the Scheduled Posts tab, to prevent rtMedia from forcing has_more_items to true incorrectly.
Extending the plugin
Section titled “Extending the plugin”Check for active scheduling
Section titled “Check for active scheduling”In your own code, check if an activity is scheduled:
$status = bp_activity_get_meta( $activity_id, '_bp_activity_status', true );if ( 'scheduled' === $status ) { // Activity is scheduled, not yet published}Add custom meta when scheduling
Section titled “Add custom meta when scheduling”add_action( 'bp_activity_posted_update', function( $content, $user_id, $activity_id ) { $status = bp_activity_get_meta( $activity_id, '_bp_activity_status', true ); if ( 'scheduled' === $status ) { bp_activity_update_meta( $activity_id, '_my_custom_meta', 'value' ); }}, 10000, 3 ); // Priority after plugin's 9999Custom UI beside the clock icon
Section titled “Custom UI beside the clock icon”// Add a UI element to the activity posting formadd_action( 'bp_activity_post_form_options', function() { echo '<div class="my-custom-option">...</div>';}, 15 ); // After plugin's priority 10Restrict scheduling to a specific member type
Section titled “Restrict scheduling to a specific member type”add_filter( 'bp_nouveau_current_user_can', function( $can, $capability, $user_id ) { if ( function_exists( 'bp_get_member_type' ) ) { $type = bp_get_member_type( $user_id ); if ( 'premium' !== $type ) { return false; // Hide scheduling UI for non-premium members } } return $can;}, 10, 3 );Notify when a scheduled post publishes
Section titled “Notify when a scheduled post publishes”add_action( 'buddypress_schedule_activity_publish', function() { // This fires every minute. To detect newly-published activities, compare // date_recorded to a short window (e.g., activities published in the last 2 minutes // that no longer have _bp_activity_status meta). // Use sparingly - this runs on every cron tick.}, 20 );
