by wbcomdesigns on WordPress.org
Easily manage your BuddyPress Activity Stream by filtering specific activity types, setting default filters, and enabling public Custom Post Types (CP …
The BuddyPress Activity Filter plugin helps site administrators customize the activity feed by setting default activity types and hiding irrelevant content. It also allows you to include activities from Custom Post Types (CPT) in the BuddyPress activity stream.
Default Filters Tab:
– Site-wide Activity Default: Set the default filter for main activity streams
– Profile Activity Default: Set the default filter for user profile activity pages
Hidden Activities Tab:
– Select specific activity types to hide from all activity streams
– Professional activity labels for better clarity
– Bulk select/deselect options for efficient management
Custom Post Types Tab:
– Enable activity generation for any public custom post type
– Customize activity labels for each post type
– Automatic activity creation when CPT posts are published
– Global settings for CPT activity visibility
Enhance your BuddyPress community with these premium add-ons:
Available Action Hooks:
* bp_activity_filter_init – Plugin initialization
* bp_activity_filter_settings_saved – After settings save
* bp_activity_filter_cpt_activity_created – When CPT activity is created
Available Filter Hooks:
* bp_activity_filter_default – Modify default filter value
* bp_activity_filter_available_filters – Customize available filters
* bp_activity_filter_query_args – Modify activity query arguments
* bp_activity_filter_eligible_post_types – Filter eligible CPTs
`php
// Enable activity for custom post type programmatically
add_filter( ‘bp_activity_filter_eligible_post_types’, function( $post_types ) {
$post_types[‘my_custom_type’] = get_post_type_object( ‘my_custom_type’ );
return $post_types;
});
// Customize activity action text
add_filter( ‘bp_activity_filter_cpt_activity_action’, function( $action, $post, $label ) {
if ( ‘my_custom_type’ === $post->post_type ) {
$action = sprintf( ‘%s shared a new %s’, get_author_name(), $label );
}
return $action;
}, 10, 3 );
`
The plugin includes several performance optimizations:
Common Issues:
Debug Mode:
Enable WordPress debug mode to see detailed error messages:
php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
For support, documentation, and feature requests:
We welcome contributions! Please see our GitHub repository for development guidelines and to submit pull requests.
Ways to Contribute:
* Report bugs and suggest features
* Submit translations
* Contribute code improvements
* Help with documentation
* Test beta releases
This plugin does not collect or store any personal user data beyond what WordPress and BuddyPress already collect. Activity filtering preferences are stored locally in browser cookies and user meta fields as needed for functionality.
Developed by Wbcom Designs – Your trusted WordPress development partner.
Special thanks to the BuddyPress community for feedback and contributions that made this plugin possible.