Use a hook.
Look in the files in the bp-activity dir – especially bp-activity-functions.php
You probably want to use one of these hooks:
do_action( 'bp_activity_posted_update', $r['content'], $r['user_id'], $activity_id );
do_action( 'bp_activity_add', $r );
There were a few actions that I was trying to hook into, but they don’t register as actions. I used include plugins_url() . '/buddypress/bp-activity/bp-activity-functions.php';
, but even with that, it still doesn’t come back as an action when I use has_action
Do you know how do_action works?
There is no need to include any WP or BP files.
Just make sure the hooks are available when you call them.
For example, in your plugin loader, use ‘bp_ready’ hook to call a function that will include any of your plugin files that rely on BP hooks.
Oooh ok.
I knew how do_action works, it’s just that I didn’t know how to provide the bp_functionality, so that’s why I was trying to use include.
Thanks for letting me know about bp_ready