Forum Replies Created
-
Yes, it works!
Thank you.Problem solved. Do i need to close this topic? I can’t find any button to close it…
Thanks for your reply!
I tested the userid returned by wp_get_current_user() with
var_dump("test user_id:".$user_id);
, but nothing displays on the activity page, even the string “test user_id:”, so I really need your help.
Thanks…And i want to know how buddypress handles with personal activity stream, where is the filter? What process it has until the streams displayed on the page? Could you please provide me some documentation or tutorial about this? Or just tell me which part of the code does this.
I’m a little confused about how buddypress works.
Thanks again.Thanks, @henrywright
So i changed my code to this:function buddypress_edit_blog_post($post_id) { global $bp; //, $user_id; $user_id = wp_get_current_user(); $post = get_post($post_id); $title = $post->post_title; $user_fullname = bp_core_get_user_displayname($user_id); bp_activity_add(array( 'action' => $user_fullname.' updated ' . $title . ':', 'component' => 'blog_post', 'type' => 'update_post', 'primary_link' => get_permalink($post_id), 'user_id' => $user_id, 'content' => $post->post_content )); } add_action('edit_post', 'buddypress_edit_blog_post');
I don’t know is it right to use wp_get_current_user() function. But the personal activity stream still doesn’t have my blog post, and the site wide activity stream still has.
What should I try next?
Thanks.Hey, sorry I’m new to Buddypress too and I can’t help you. But I’m also interested in your questions. Had you got any answer for you question? If it is yes, I want to know how you solved these problem. If it’s not, let’s find it out together.