Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Remove User ID from Blog Related Site Wide Activity


Burt Adsit
Participant

@burtadsit

Howdy. There’s a function in bp-blogs.php called bp_blogs_record_activity(). It’s triggered by 3 actions in bp. If you look at it, it does some setup stuff and then calls bp’s basic ‘record this stuff as an activity function’ bp_record_activity().

The three actions that trigger bp_blogs_record_activity() are listed underneath the fn.

Do:

remove_action( 'bp_blogs_new_blog_post', 'bp_blogs_record_activity' );
add_action('bp_blogs_new_blog_post', 'NOADMIN_bp_blogs_record_activity' );

Copy the function bp_blogs_record_activity() to NOADMIN_bp_blogs_record_activity(), filter yourself out inside the NOADMIN version and allow all other normal activity to occur.

I’ve got a little utility plugin that is collecting things like this for my mods. No core hacking since Andy has all sorts of hooks builtin for us to use. Like this case.

Skip to toolbar