PHP API
Reference for the public functions, data structures, and integration points in BuddyPress Moderation Pro. Signatures are taken from the plugin source.
Functions
Section titled “Functions”bmpro_spam_statuses()
Section titled “bmpro_spam_statuses()”Returns the moderation status options used to filter the queue.
// array(// 'awaiting_moderation' => 'Pending',// 'spam' => 'Spam',// )Filter: bmpro_spam_statuses_types.
bmpro_content_to_flag_array()
Section titled “bmpro_content_to_flag_array()”Returns the settings tabs added after Welcome and General.
// 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()”Returns the auto-moderation report threshold as an integer. Reads auto_mod_limit from the bmpro_restrictions option and defaults to 5.
Filter: bmpro_auto_mod_limit_filter (passed the limit and the settings array).
bmpro_auto_moderation_enable( $component )
Section titled “bmpro_auto_moderation_enable( $component )”Returns whether auto-moderation is enabled for the given component (activity, comment, member, group, and so on).
Filter: bmpro_auto_moderation_enable.
bmpro_get_moderation_content_visibility()
Section titled “bmpro_get_moderation_content_visibility()”Returns who loses sight of reported content, either 'reporters' or 'all_users'.
Filter: bmpro_get_moderation_mode_filter.
bmpro_user_can_report( $user_id = 0 )
Section titled “bmpro_user_can_report( $user_id = 0 )”Returns whether the user (current user when 0) may report content, based on the roles allowed on the General tab.
Filter: bmpro_user_can_report.
bmpro_get_users( $role )
Section titled “bmpro_get_users( $role )”Returns the WP_User objects for a role.
Filter: bpmp_get_users.
bmpro_get_moderator_users( $role )
Section titled “bmpro_get_moderator_users( $role )”Returns the configured notification recipient IDs for $role (for example admin or moderator), read from the bmpro_gen_stngs option.
Filter: bpmp_moderator_users.
bmpro_count_reporters()
Section titled “bmpro_count_reporters()”Returns the count of pending reports, used for the admin menu badge.
Filter: bmpro_count_reporters_filter.
Custom post types and taxonomy
Section titled “Custom post types and taxonomy”bmpro_spam- Each reported content item. Uses thebmpro_spam/bmpro_spamscapability type and is shown under the Moderation menu.bmpro_avatar_spam- Each pending avatar submission. Shown under the Avatar Mods menu.bmpro_content_type- Taxonomy onbmpro_spamthat records the content type of each report (activity, comment, member, group, message, topic, reply).
Front-end actions are dispatched through admin-ajax.php. The public script is localized as bmpro_ajax_object, and every request is verified with check_ajax_referer( 'bmpro_ajax_security', 'ajax_nonce' ).
Flag and unflag handlers exist per content type, for example bmpro_flag_activity_function / bmpro_unflag_activity_function, with equivalents for comment, member, group, message, topic, and reply. Moderation actions include bmpro_spam_hide_function, bmpro_spam_delete_function, bmpro_spam_cleanup_function, bmpro_spam_author_punish_function, bmpro_spam_member_lock_function, and the avatar bmpro_approve_avatar_function / bmpro_reject_avatar_function.
The plugin does not register its own REST routes. It hooks bp_rest_activity_prepare_value (via bmpro_data_embed_rest_api) to embed moderation data in the BuddyPress activity REST response.
WP-CLI
Section titled “WP-CLI”The bmpro command provides:
wp bmpro status- Current moderation configuration and counts.wp bmpro stats- Report statistics.wp bmpro cleanup- Clean up reported content.

