Changeset 1749 for trunk/bp-friends.php
- Timestamp:
- 09/01/2009 01:45:37 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends.php
r1723 r1749 47 47 $bp->friends->format_notification_function = 'friends_format_notifications'; 48 48 $bp->friends->slug = BP_FRIENDS_SLUG; 49 50 /* Register the activity stream actions for this component */ 51 friends_register_activity_action( 'friendship_created', __( 'New friendship created', 'buddypress' ) ); 49 52 50 53 /* Register this in the active components array */ … … 290 293 291 294 switch( $action ) { 292 case 'friendship_ accepted':295 case 'friendship_created': 293 296 $friendship = new BP_Friends_Friendship( $item_id, false, false ); 294 297 … … 323 326 } 324 327 328 function friends_register_activity_action( $key, $value ) { 329 global $bp; 330 331 if ( !function_exists( 'bp_activity_set_action' ) ) 332 return false; 333 334 return apply_filters( 'friends_register_activity_action', bp_activity_set_action( $bp->friends->id, $key, $value ), $key, $value ); 335 } 336 325 337 function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) { 326 338 global $bp; … … 636 648 637 649 // Record in activity streams 638 friends_record_activity( array( 'item_id' => $friendship_id, 'component_name' => $bp->friends->slug, 'component_action' => 'friendship_ accepted', 'is_private' => 0, 'user_id' => $friendship->initiator_user_id, 'secondary_user_id' => $friendship->friend_user_id ) );650 friends_record_activity( array( 'item_id' => $friendship_id, 'component_name' => $bp->friends->slug, 'component_action' => 'friendship_created', 'is_private' => 0, 'user_id' => $friendship->initiator_user_id, 'secondary_user_id' => $friendship->friend_user_id ) ); 639 651 640 652 // Send the email notification
Note: See TracChangeset
for help on using the changeset viewer.