Ticket #3296: 3296.001.patch
| File 3296.001.patch, 1.4 KB (added by , 15 years ago) |
|---|
-
bp-activity/bp-activity-functions.php
67 67 $new_mention_count = (int)get_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mention_count' ), true ); 68 68 if ( !$new_mentions = get_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mentions' ), true ) ) 69 69 $new_mentions = array(); 70 70 71 71 switch ( $action ) { 72 72 case 'delete' : 73 73 $key = array_search( $activity_id, $new_mentions ); … … 75 75 unset( $new_mentions[$key] ); 76 76 } 77 77 break; 78 78 79 79 case 'add' : 80 80 default : 81 81 if ( !in_array( $activity_id, $new_mentions ) ) { … … 83 83 } 84 84 break; 85 85 } 86 87 // Get an updated mention count 86 87 // Get an updated mention count 88 88 $new_mention_count = count( $new_mentions ); 89 89 90 90 // Resave the user_meta 91 91 update_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mention_count' ), $new_mention_count ); 92 92 update_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mentions' ), $new_mentions ); … … 890 890 $link = bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $activity_obj->id . '/'; 891 891 } 892 892 893 return apply_filters ( 'bp_activity_get_permalink', $link);893 return apply_filters_ref_array( 'bp_activity_get_permalink', array( $link, &$activity_obj ) ); 894 894 } 895 895 896 896 function bp_activity_hide_user_activity( $user_id ) {