PHP API Reference
BuddyPress Moderation Pro overviewPremiumGet BuddyPress Moderation Pro →
Complete reference for all public functions, classes, and APIs in BuddyPress Moderation Pro.
Table of Contents
Section titled “Table of Contents”- Core Functions
- User & Permission Functions
- Content Status Functions
- Moderation Action Functions
- Avatar Functions
- Cleanup Functions
- Utility Functions
- Settings Functions
- Caching System
- Database Reference
- AJAX Endpoints
- REST API
Core Functions
Section titled “Core Functions”bmpro_spam_statuses()
Section titled “bmpro_spam_statuses()”Get available spam status types for filtering.
Returns: array - Associative array of status slugs and labels
Example:
$statuses = bmpro_spam_statuses();// Returns:// array(// '' => 'All',// 'pending' => 'Pending',// 'spam' => 'Spam',// 'approved'=> 'Approved'// )Filter: bmpro_spam_statuses_types
bmpro_content_to_flag_array()
Section titled “bmpro_content_to_flag_array()”Get array of content types available for flagging/moderation.
Returns: array - Associative array of content type slugs and labels
Example:
$content_types = bmpro_content_to_flag_array();// Returns:// array(// 'restrictions' => 'Restrictions',// 'profile_avatar' => 'Avatar Moderation',// 'reported-keyword' => 'Categorize By Report'// )Filter: bmpro_content_to_flag
bmpro_auto_mod_limit_count()
Section titled “bmpro_auto_mod_limit_count()”Get the auto-moderation report threshold.
Returns: int - Number of reports required before auto-moderation triggers
Default: 5
Example:
$threshold = bmpro_auto_mod_limit_count();if ( $report_count >= $threshold ) { // Auto-hide content}Filter: bmpro_auto_mod_limit_filter
bmpro_auto_moderation_enable( $component )
Section titled “bmpro_auto_moderation_enable( $component )”Check if auto-moderation is enabled for a specific component.
Parameters:
| Name | Type | Description |
|---|---|---|
$component |
string | Component name: activity, member, group, message, topic, reply |
Returns: bool - Whether auto-moderation is enabled
Example:
if ( bmpro_auto_moderation_enable( 'activity' ) ) { // Check report count and auto-moderate}Filter: bmpro_auto_moderation_enable
bmpro_get_moderation_content_visibility()
Section titled “bmpro_get_moderation_content_visibility()”Get the visibility mode for moderated content.
Returns: string - Either 'reporters' or 'all_users'
| Value | Description |
|---|---|
reporters |
Hidden content visible only to reporter and admins |
all_users |
Hidden content invisible to everyone except admins |
Example:
$visibility = bmpro_get_moderation_content_visibility();if ( $visibility === 'reporters' ) { // Show content to reporter only}Filter: bmpro_get_moderation_mode_filter
User & Permission Functions
Section titled “User & Permission Functions”bmpro_user_can_report( $user_id = 0 )
Section titled “bmpro_user_can_report( $user_id = 0 )”Check if a user has permission to report content.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
$user_id |
int | 0 | User ID (0 for current user) |
Returns: bool - Whether user can report content
Example:
if ( bmpro_user_can_report() ) { // Show report button echo '<button class="bmpro-flag-btn">Report</button>';}Filter: bmpro_user_can_report
bmpro_get_users( $role )
Section titled “bmpro_get_users( $role )”Get users by WordPress role.
Parameters:
| Name | Type | Description |
|---|---|---|
$role |
string | WordPress role slug |
Returns: array - Array of WP_User objects
Example:
$moderators = bmpro_get_users( 'bp_moderator_pro' );foreach ( $moderators as $moderator ) { echo $moderator->display_name;}Filter: bpmp_get_users
bmpro_get_moderator_users( $role = ‘’ )
Section titled “bmpro_get_moderator_users( $role = ‘’ )”Get moderator users with fallback to administrators.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
$role |
string | ‘’ | Optional specific role |
Returns: array|bool - Array of user IDs or false
Example:
$moderator_ids = bmpro_get_moderator_users();if ( in_array( get_current_user_id(), $moderator_ids ) ) { // User is a moderator}Filter: bpmp_moderator_users
bmpro_members_get_user_url( $author_id )
Section titled “bmpro_members_get_user_url( $author_id )”Get the BuddyPress profile URL for a user (BP 12.0+ compatible).
Parameters:
| Name | Type | Description |
|---|---|---|
$author_id |
int | User ID |
Returns: string - Profile URL
Example:
$profile_url = bmpro_members_get_user_url( 123 );echo '<a href="' . esc_url( $profile_url ) . '">View Profile</a>';Filter: bpmp_members_get_user_url
Content Status Functions
Section titled “Content Status Functions”bmpro_get_activity_post_status( $activity_id, $meta_key = ‘’ )
Section titled “bmpro_get_activity_post_status( $activity_id, $meta_key = ‘’ )”Get the moderation/spam status for an activity.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
$activity_id |
int | - | Activity ID |
$meta_key |
string | ‘’ | Optional specific meta key |
Returns: mixed - Status value or array of statuses
Example:
$status = bmpro_get_activity_post_status( $activity_id );if ( $status === 'spam' ) { // Activity is marked as spam}Filter: bmpro_get_activity_post_status_filter
bmpro_exclude_moderated_content( $object, $object_id )
Section titled “bmpro_exclude_moderated_content( $object, $object_id )”Check if content should be excluded/hidden from display.
Parameters:
| Name | Type | Description |
|---|---|---|
$object |
string | Object type: activity, member, group, etc. |
$object_id |
int | Object ID |
Returns: bool - Whether content should be hidden
Example:
if ( bmpro_exclude_moderated_content( 'activity', $activity_id ) ) { // Don't display this activity continue;}Filter: bmpro_exclude_moderated_content
bmpro_get_reports_count( $object_id, $object )
Section titled “bmpro_get_reports_count( $object_id, $object )”Get the number of reports and list of reporters for content.
Parameters:
| Name | Type | Description |
|---|---|---|
$object_id |
int | Object ID |
$object |
string | Object type |
Returns: array - Array with count and reporters keys
Example:
$reports = bmpro_get_reports_count( $activity_id, 'activity' );echo 'This content has ' . $reports['count'] . ' reports';// $reports['reporters'] contains array of user IDsFilter: bmpro_count_reporters_filter
bmpro_is_enabled_flagging( $content_type )
Section titled “bmpro_is_enabled_flagging( $content_type )”Check if flagging is enabled for a content type.
Parameters:
| Name | Type | Description |
|---|---|---|
$content_type |
string | Content type slug |
Returns: bool - Whether flagging is enabled
Note: This function is deprecated but maintained for backward compatibility.
Example:
if ( bmpro_is_enabled_flagging( 'activity' ) ) { // Show flag button}Filter: bmpro_get_is_enabled_flagging
bmpro_get_spam_post_id( $activity_id )
Section titled “bmpro_get_spam_post_id( $activity_id )”Get the spam report post ID for an activity (with caching).
Parameters:
| Name | Type | Description |
|---|---|---|
$activity_id |
int | Activity ID |
Returns: int|null - Spam post ID or null
Example:
$spam_post_id = bmpro_get_spam_post_id( $activity_id );if ( $spam_post_id ) { $report_url = get_edit_post_link( $spam_post_id );}bmpro_preload_spam_data( $activity_ids )
Section titled “bmpro_preload_spam_data( $activity_ids )”Batch preload spam data for multiple activities (performance optimization).
Parameters:
| Name | Type | Description |
|---|---|---|
$activity_ids |
array | Array of activity IDs |
Returns: void
Example:
// Before looping through activities$activity_ids = wp_list_pluck( $activities, 'id' );bmpro_preload_spam_data( $activity_ids );
// Now individual lookups are cachedforeach ( $activities as $activity ) { $spam_id = bmpro_get_spam_post_id( $activity->id );}Moderation Action Functions
Section titled “Moderation Action Functions”bmpro_member_related_actions()
Section titled “bmpro_member_related_actions()”Get available moderation actions for reported members.
Returns: array - Associative array of action slugs and labels
Example:
$actions = bmpro_member_related_actions();// Returns:// array(// 'no_action' => 'No action',// 'spammer' => 'Mark user as spammer',// 'suspend' => 'Suspend account',// ...// )Filter: bmpro_member_related_actions_filter
bmpro_group_related_actions()
Section titled “bmpro_group_related_actions()”Get available moderation actions for reported groups.
Returns: array - Associative array of action slugs and labels
Example:
$actions = bmpro_group_related_actions();foreach ( $actions as $slug => $label ) { echo "<option value='{$slug}'>{$label}</option>";}Filter: bmpro_group_related_actions_filter
bmpro_members_moderation_restrictions()
Section titled “bmpro_members_moderation_restrictions()”Get configured member restriction settings.
Returns: array - Array of enabled restriction slugs
Available Restrictions:
| Slug | Description |
|---|---|
dir_hide |
Hide from member directory |
block_updates |
Block activity updates |
disable_pm |
Disable private messaging |
restrict_comments |
Restrict commenting |
Example:
$restrictions = bmpro_members_moderation_restrictions();if ( in_array( 'disable_pm', $restrictions ) ) { // PM restriction is enabled}Filter: bmpro_members_moderation_restrictions_filter
bmpro_groups_moderation_restrictions()
Section titled “bmpro_groups_moderation_restrictions()”Get configured group restriction settings.
Returns: array - Array of enabled restriction slugs
Example:
$restrictions = bmpro_groups_moderation_restrictions();Filter: bmpro_groups_moderation_restrictions_filter
bmpro_check_related_actions( $object_id, $action, $value )
Section titled “bmpro_check_related_actions( $object_id, $action, $value )”Check if a specific moderation action is applied to an object.
Parameters:
| Name | Type | Description |
|---|---|---|
$object_id |
int | Object ID (user or group) |
$action |
string | Action type |
$value |
string | Expected value |
Returns: bool - Whether action is applied
Example:
if ( bmpro_check_related_actions( $user_id, 'suspend', 'yes' ) ) { // User is suspended wp_die( 'Your account is suspended.' );}bmpro_get_account_lock_message()
Section titled “bmpro_get_account_lock_message()”Get the custom message shown to locked accounts.
Returns: string - Lock message (HTML allowed)
Default: “Your account has been locked due to policy violations.”
Example:
if ( $is_locked ) { echo '<div class="error">' . bmpro_get_account_lock_message() . '</div>';}Filter: bmpro_account_lock_message_filter
Avatar Functions
Section titled “Avatar Functions”bmpro_get_last_avatar_spam_post_id( $user_id )
Section titled “bmpro_get_last_avatar_spam_post_id( $user_id )”Get the pending avatar moderation post for a user.
Parameters:
| Name | Type | Description |
|---|---|---|
$user_id |
int | User ID |
Returns: int|null - Avatar spam post ID or null
Example:
$avatar_post_id = bmpro_get_last_avatar_spam_post_id( $user_id );if ( $avatar_post_id ) { $status = get_post_meta( $avatar_post_id, '_bp_user_avatar_flag', true ); // 0 = pending, 1 = approved, 2 = rejected}bmpro_get_last_group_avatar_spam_post_id( $group_id )
Section titled “bmpro_get_last_group_avatar_spam_post_id( $group_id )”Get the pending avatar moderation post for a group.
Parameters:
| Name | Type | Description |
|---|---|---|
$group_id |
int | Group ID |
Returns: int|null - Avatar spam post ID or null
Example:
$avatar_post_id = bmpro_get_last_group_avatar_spam_post_id( $group_id );if ( $avatar_post_id ) { // Group has pending avatar}Cleanup Functions
Section titled “Cleanup Functions”bmpro_activity_update_cleanup()
Section titled “bmpro_activity_update_cleanup()”Clean up flagged activity update data when report is resolved.
Returns: void
Triggered by: Admin action on spam post
bmpro_activity_comment_cleanup()
Section titled “bmpro_activity_comment_cleanup()”Clean up flagged activity comment data when report is resolved.
Returns: void
bmpro_private_message_cleanup()
Section titled “bmpro_private_message_cleanup()”Clean up flagged private message data when report is resolved.
Returns: void
bmpro_member_cleanup()
Section titled “bmpro_member_cleanup()”Clean up flagged member data when report is resolved.
Returns: void
bmpro_group_cleanup()
Section titled “bmpro_group_cleanup()”Clean up flagged group data when report is resolved.
Returns: void
bmpro_topics_cleanup()
Section titled “bmpro_topics_cleanup()”Clean up flagged bbPress topic data when report is resolved.
Returns: void
bmpro_replies_cleanup()
Section titled “bmpro_replies_cleanup()”Clean up flagged bbPress reply data when report is resolved.
Returns: void
Utility Functions
Section titled “Utility Functions”bmpro_get_flag_button_text( $text )
Section titled “bmpro_get_flag_button_text( $text )”Get customized flag/unflag button text.
Parameters:
| Name | Type | Description |
|---|---|---|
$text |
string | Text type: 'flag' or 'unflag' |
Returns: string - Customized button text
Example:
$flag_text = bmpro_get_flag_button_text( 'flag' );$unflag_text = bmpro_get_flag_button_text( 'unflag' );
echo "<button class='flag-btn'>{$flag_text}</button>";Filter: bmpro_get_flag_unflag_text
bmpro_count_reporters()
Section titled “bmpro_count_reporters()”Count total unique reporters across all flagged content.
Returns: int - Total reporter count
Example:
$total_reporters = bmpro_count_reporters();echo "Total users who reported content: {$total_reporters}";bmpro_is_nouveau_active()
Section titled “bmpro_is_nouveau_active()”Check if BuddyPress Nouveau template pack is active.
Returns: bool
Example:
if ( bmpro_is_nouveau_active() ) { // Use Nouveau-specific markup}bmpro_is_legacy_active()
Section titled “bmpro_is_legacy_active()”Check if BuddyPress Legacy template pack is active.
Returns: bool
bmpro_theme_support()
Section titled “bmpro_theme_support()”Get list of themes with built-in moderation styling support.
Returns: array - Array of theme slugs
Default: array( 'reign-theme', 'buddyx', 'buddyx-pro' )
Filter: buddypress_moderation_theme_suuport
bmpro_get_is_relevant_buddypress_page()
Section titled “bmpro_get_is_relevant_buddypress_page()”Check if current page should load moderation assets.
Returns: bool
Example:
if ( bmpro_get_is_relevant_buddypress_page() ) { wp_enqueue_script( 'bmpro-frontend' );}bmpro_render_report_modal( $modal_type, $report_subjects, $hidden_fields, $submit_button_id, $modal_title )
Section titled “bmpro_render_report_modal( $modal_type, $report_subjects, $hidden_fields, $submit_button_id, $modal_title )”Render an accessible report modal dialog.
Parameters:
| Name | Type | Description |
|---|---|---|
$modal_type |
string | Modal identifier |
$report_subjects |
array | Report reason options |
$hidden_fields |
array | Hidden form fields |
$submit_button_id |
string | Submit button element ID |
$modal_title |
string | Modal dialog title |
Returns: string - Modal HTML
Example:
$hidden = array( 'activity_id' => $activity_id, 'action' => 'bmpro_flag_activity_function');
$subjects = array( 'Spam', 'Harassment', 'Inappropriate Content');
echo bmpro_render_report_modal( 'activity-report', $subjects, $hidden, 'bmpro-submit-activity-report', __( 'Report Activity', 'buddypress-moderation-pro' ));Settings Functions
Section titled “Settings Functions”bmpro_email_notification_is_enable( $key )
Section titled “bmpro_email_notification_is_enable( $key )”Check if email notifications are enabled for a specific type.
Parameters:
| Name | Type | Description |
|---|---|---|
$key |
string | Notification key: 'admin' or 'moderator' |
Returns: bool
Example:
if ( bmpro_email_notification_is_enable( 'admin' ) ) { wp_mail( $admin_email, 'New Report', $message );}Filter: bmpro_filter_enabled_admin_flag_email
bmpro_bp_notification_is_enable( $key )
Section titled “bmpro_bp_notification_is_enable( $key )”Check if BuddyPress notifications are enabled for a specific type.
Parameters:
| Name | Type | Description |
|---|---|---|
$key |
string | Notification key |
Returns: bool
Example:
if ( bmpro_bp_notification_is_enable( 'admin' ) ) { bp_notifications_add_notification( array( 'user_id' => $admin_id, // ... ) );}Filter: bmpro_filter_enabled_bp_notification
bmpro_admin_tabs_functions( $current )
Section titled “bmpro_admin_tabs_functions( $current )”Load admin settings tab template.
Parameters:
| Name | Type | Description |
|---|---|---|
$current |
string | Current tab slug |
Returns: void
Database Reference
Section titled “Database Reference”Custom Post Types
Section titled “Custom Post Types”bmpro_spam
Section titled “bmpro_spam”Report log for flagged content.
Supports: title, author
Post Meta:
| Key | Type | Description |
|---|---|---|
bmpro_spam_activity_id |
int | Original content ID |
bmpro_spam_reported_by |
array | Reporter user IDs |
bmpro_spam_status |
string | 'awaiting_moderation' or 'spam' |
bmpro_hide_mode |
string | 'reporters' or 'all_users' |
bmpro_member_actions |
array | Member moderation actions |
bmpro_groups_actions |
array | Group moderation actions |
bmpro_lock_member_account |
string | 'yes' if locked |
bmpro_account_lock_message |
string | Custom lock message |
activity_reports |
array | Report details |
bmpro_avatar_spam
Section titled “bmpro_avatar_spam”Avatar moderation reports.
Post Meta:
| Key | Type | Description |
|---|---|---|
_bp_user_id |
int | User ID (for profile avatars) |
_bp_group_id |
int | Group ID (for group avatars) |
_bp_user_avatar_flag |
int | 0=pending, 1=approved, 2=rejected |
_bp_group_avatar_flag |
int | 0=pending, 1=approved, 2=rejected |
_bp_is_group_avatar |
bool | True for group avatars |
Taxonomies
Section titled “Taxonomies”bmpro_content_type
Section titled “bmpro_content_type”Categorizes spam reports by content type.
Terms:
activity_updateactivity_commentmembergroupmessagetopicreplygroup_avataruser_avatar
User Meta
Section titled “User Meta”| Key | Type | Description |
|---|---|---|
bmpro_flagged_activities |
array | Flagged content tracking |
bmpro_member_punish |
string | Punishment status |
bmpro_flagged_member_meta |
array | Reporter info |
Activity Meta
Section titled “Activity Meta”| Key | Type | Description |
|---|---|---|
bmpro_flagged_activity_meta |
array | Reporter list |
_bp_moderation |
int | Auto-moderation flag (1=moderated) |
Group Meta
Section titled “Group Meta”| Key | Type | Description |
|---|---|---|
bmpro_flagged_group_meta |
array | Reporter list |
AJAX Endpoints
Section titled “AJAX Endpoints”All AJAX endpoints require authentication and nonce verification.
Activity Moderation
Section titled “Activity Moderation”| Action | Description |
|---|---|
bmpro_flag_activity_report |
Show activity report modal |
bmpro_flag_activity_function |
Submit activity report |
bmpro_unflag_activity_function |
Remove activity flag |
Comment Moderation
Section titled “Comment Moderation”| Action | Description |
|---|---|
bmpro_flag_comment_report |
Show comment report modal |
bmpro_flag_comment_function |
Submit comment report |
bmpro_unflag_comment_function |
Remove comment flag |
Member Moderation
Section titled “Member Moderation”| Action | Description |
|---|---|
bmpro_flag_member_report |
Show member report modal |
bmpro_flag_member_function |
Submit member report |
bmpro_unflag_member_function |
Remove member flag |
Group Moderation
Section titled “Group Moderation”| Action | Description |
|---|---|
bmpro_flag_group_report |
Show group report modal |
bmpro_flag_group_function |
Submit group report |
bmpro_unflag_group_function |
Remove group flag |
Message Moderation
Section titled “Message Moderation”| Action | Description |
|---|---|
bmpro_flag_message_report |
Show message report modal |
bmpro_flag_message_function |
Submit message report |
bmpro_unflag_message_function |
Remove message flag |
bbPress Moderation
Section titled “bbPress Moderation”| Action | Description |
|---|---|
bmpro_flag_topic_report |
Show topic report modal |
bmpro_flag_topic_function |
Submit topic report |
bmpro_unflag_topic_function |
Remove topic flag |
bmpro_flag_reply_report |
Show reply report modal |
bmpro_flag_reply_function |
Submit reply report |
bmpro_unflag_reply_function |
Remove reply flag |
Admin AJAX
Section titled “Admin AJAX”| Action | Description |
|---|---|
bmpro_spam_cleanup_function |
Mark content as clean |
bmpro_spam_delete_function |
Delete spam record |
bmpro_spam_hide_function |
Hide content |
bmpro_spam_member_lock_function |
Lock member account |
bmpro_spam_author_punish_function |
Apply author punishment |
bmpro_approve_avatar_function |
Approve avatar |
AJAX Response Format
Section titled “AJAX Response Format”// Success{ success: true, data: { message: 'Report submitted successfully', // Additional data }}
// Error{ success: false, data: { message: 'Error message' }}REST API
Section titled “REST API”Activity Endpoint Extension
Section titled “Activity Endpoint Extension”The plugin extends the BuddyPress activity REST endpoint to include moderation data.
Filter: bp_rest_activity_prepare_value
Added Fields:
{ "bmpro_is_flagged": true, "bmpro_report_count": 3, "bmpro_can_report": true}JavaScript API
Section titled “JavaScript API”Global Object
Section titled “Global Object”// Available after enqueuing moderation scriptswindow.bmpro_ajax_object = { ajax_url: '/wp-admin/admin-ajax.php', ajax_nonce: 'abc123...', flag_text: 'Flag', unflag_text: 'Unflag', rreport_successfull: 'Report submitted successfully', required_report_description: 'Please provide a description', avatar_moderation_message: 'Your avatar is pending approval', group_avatar_moderation_message: 'Group avatar is pending approval'};Events
Section titled “Events”// Listen for report submissionjQuery(document).on('bmpro:report:submitted', function(e, data) { console.log('Report submitted:', data);});
// Listen for modal openjQuery(document).on('bmpro:modal:opened', function(e, modalType) { console.log('Modal opened:', modalType);});Caching System
Section titled “Caching System”BuddyPress Moderation Pro includes a performance caching layer (BMPRO_Cache class) that reduces database queries through batch preloading and multi-layer caching.
bmpro_cache()
Section titled “bmpro_cache()”Get the singleton cache instance.
Returns: BMPRO_Cache - Cache manager instance
Example:
$cache = bmpro_cache();$data = $cache->get_activity_moderation( $activity_id );BMPRO_Cache::get_activity_moderation()
Section titled “BMPRO_Cache::get_activity_moderation()”Get moderation data for an activity, with automatic caching.
Parameters:
$activity_id(int) - Activity ID to check
Returns: array|false - Moderation data or false if not moderated
Example:
$cache = bmpro_cache();$mod_data = $cache->get_activity_moderation( 123 );
if ( $mod_data ) { echo 'Activity is moderated. Status: ' . $mod_data['status'];}BMPRO_Cache::batch_load_activity_moderation()
Section titled “BMPRO_Cache::batch_load_activity_moderation()”Preload moderation data for multiple activities in a single query. Call this before loops to avoid N+1 queries.
Parameters:
$activity_ids(array) - Array of activity IDs
Returns: void
Example:
// Before activity loop$activity_ids = wp_list_pluck( $activities, 'id' );bmpro_cache()->batch_load_activity_moderation( $activity_ids );
// Now individual lookups are cachedforeach ( $activities as $activity ) { $mod = bmpro_cache()->get_activity_moderation( $activity->id );}BMPRO_Cache::invalidate()
Section titled “BMPRO_Cache::invalidate()”Clear cached data when moderation status changes.
Parameters:
$type(string) - Cache type: ‘activity_mod’, ‘member_flagged_meta’, ‘user_block’, etc.$id(int) - Item ID to invalidate
Example:
// After updating moderation statusbmpro_cache()->invalidate( 'activity_mod', $activity_id );Cache Keys Reference
Section titled “Cache Keys Reference”| Key Pattern | Description |
|---|---|
activity_mod_{id} |
Activity moderation status |
member_flagged_meta_{id} |
Member flagged status |
user_block_{id} |
User’s block list |
user_blocked_by_{id} |
Who has blocked this user |
user_flagged_{id} |
User’s flagged activities |
Cache Layers
Section titled “Cache Layers”- Runtime Cache - In-memory array for current request (fastest)
- Object Cache - Uses
wp_cachefor persistent storage (works with Redis/Memcached) - Database - Fallback when cache misses
Performance Best Practices
Section titled “Performance Best Practices”// DO: Batch preload before loops$ids = get_activity_ids_from_query();bmpro_cache()->batch_load_activity_moderation( $ids );
// DON'T: Query individually in loopsforeach ( $activities as $activity ) { // This causes N+1 queries without batch preload $status = bmpro_is_activity_moderated( $activity->id );}CSS Classes
Section titled “CSS Classes”Button Classes
Section titled “Button Classes”| Class | Description |
|---|---|
.bmpro-flag-activity-btn |
Activity flag button |
.bmpro-unflag-activity-btn |
Activity unflag button |
.bmpro-flag-member-btn |
Member flag button |
.bmpro-flag-group-btn |
Group flag button |
.bmpro-flag-message-btn |
Message flag button |
.bmpro-flag-topic-btn |
Topic flag button |
.bmpro-flag-reply-btn |
Reply flag button |
Modal Classes
Section titled “Modal Classes”| Class | Description |
|---|---|
.bmpro-modal |
Modal container |
.bmpro-modal-wrap |
Modal wrapper |
.bmpro-modal-content |
Modal content area |
.bmpro-modal-actions |
Action buttons container |
.bmpro-modal-close-icon |
Close button |
State Classes
Section titled “State Classes”| Class | Description |
|---|---|
.bmpro-loading |
Loading state |
.bmpro-error |
Error message |
.bmpro-successfull |
Success message |
.bmpro-modal-overlay-active |
Body class when modal open |
Last Updated: 2026-01-27 Plugin Version: 4.x+ WordPress: 6.0+ BuddyPress: 7.0+
See Also:

