Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Remove User ID from Blog Related Site Wide Activity


westpointer
Participant

@westpointer

Not sure if you found an elegant answer, but you could hack the source code. I know, not the preferred method but if you track it so you add it in at the next update.

This will get the job done to remove all user_id is 1 activity from the site wide activity.

In bp-activity/bp-activity-classes.php in the function get_sitewide_activity around line 261:

FIND: $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $bp['activity']['table_name_sitewide'] . " ORDER BY date_recorded DESC $limit_sql" ) );

CHANGE TO:

$activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $bp['activity']['table_name_sitewide'] . " WHERE user_id != 1 ORDER BY date_recorded DESC $limit_sql" ) );

Now user 1’s activity will not show on site wide activity.

Skip to toolbar