Reply To: Make Amen plugin BuddyPress compatible
I’m guessing I’ll have to use a hook of some kind to accomplish this
You’re right. But the hook would be supplied by the Amen plugin. You could start by asking the plugin’s support if one is available. I’m guessing here but it will probably be called something like after_submit_prayer_request.
Then you’d build your own function which you can ‘hook’ on to the ‘after_submit_prayer_request’ hook (don’t forget I’m guessing at the hook name).
Your function would simply add an item to the BP activity stream and will look something like this:
function add_prayer_request_to_stream() {
bp_activity_add( $args )
}
add_action( 'add_prayer_request_to_stream', 'actual_hook_name' );
Note: This won’t work until you have the actual hook name and have supplied the $args as an array that describes the activity item you’re creating.
See here for more info on the bp_activity_add() function