Activity meta update and $activity_id
-
I’m on the verge of madness with this, it’s not funny.
I want to add a field to the activity post form. I modified the form, global.js and bp_custom.php according to a post I found on the forum and it works, meaning the data is entered into the database BUT it always has the activity_id value 1. I tried anything I could find on the forums.
Basically, the problem is $activity_id which is always 1. The rest seems to work.
This is what i got in bp_custom.php:`function add_title_to_activity( $content, $user_id, $activity_id ) {
bp_activity_update_meta( $activity_id, ‘title’, $_POST );
}add_action( ‘bp_groups_posted_update’, ‘add_title_to_activity’, 10, 3 );`
If anyone has any ideas as to why $activity_id doesn’t contain the actual id of the posted update, please help.
- The topic ‘Activity meta update and $activity_id’ is closed to new replies.