Changeset 854 for trunk/bp-friends.php
- Timestamp:
- 01/16/2009 09:00:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends.php
r805 r854 227 227 228 228 if ( $for_secondary_user ) { 229 230 $user_1 = bp_core_get_userlink( $friendship->initiator_user_id ); 231 $user_2 = bp_core_get_userlink($friendship->friend_user_id, false, false, true); 232 229 233 return array( 230 234 'primary_link' => bp_core_get_userlink( $friendship->friend_user_id, false, true ), 231 'content' => sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->initiator_user_id ), bp_core_get_userlink($friendship->friend_user_id, false, false, true) ) . ' <span class="time-since">%s</span>'235 'content' => apply_filters( 'bp_friends_friendship_accepted_activity', sprintf( __( '%s and %s are now friends', 'buddypress' ), $user_1, $user_2 ) . ' <span class="time-since">%s</span>', $user_1, $user_2 ) 232 236 ); 233 237 } else { 238 $user_1 = bp_core_get_userlink( $friendship->friend_user_id ); 239 $user_2 = bp_core_get_userlink($friendship->initiator_user_id); 240 234 241 return array( 235 242 'primary_link' => bp_core_get_userlink( $friendship->friend_user_id, false, true ), 236 'content' => sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->friend_user_id ), bp_core_get_userlink($friendship->initiator_user_id) ) . ' <span class="time-since">%s</span>'243 'content' => apply_filters( 'bp_friends_friendship_accepted_activity', sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->friend_user_id ), bp_core_get_userlink($friendship->initiator_user_id) ) . ' <span class="time-since">%s</span>', $user_1, $user_2 ) 237 244 ); 238 245 } … … 250 257 case 'friendship_accepted': 251 258 if ( (int)$total_items > 1 ) { 252 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/my-friends/newest" title="' . __( 'My Friends', 'buddypress' ) . '">' . sprintf( __('%d friends accepted your friendship requests'), (int)$total_items ) . '</a>';259 return apply_filters( 'bp_friends_multiple_friendship_accepted_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/my-friends/newest" title="' . __( 'My Friends', 'buddypress' ) . '">' . sprintf( __('%d friends accepted your friendship requests'), (int)$total_items ) . '</a>', (int)$total_items ); 253 260 } else { 254 261 $user_fullname = bp_core_global_user_fullname( $item_id ); 255 262 $user_url = bp_core_get_userurl( $item_id ); 256 return '<a href="' . $user_url . '?new" title="' . $user_fullname .'\'s profile">' . sprintf( __('%s accepted your friendship request'), $user_fullname ) . '</a>';263 return apply_filters( 'bp_friends_single_friendship_accepted_notification', '<a href="' . $user_url . '?new" title="' . $user_fullname .'\'s profile">' . sprintf( __('%s accepted your friendship request'), $user_fullname ) . '</a>', $user_fullname ); 257 264 } 258 265 break; … … 260 267 case 'friendship_request': 261 268 if ( (int)$total_items > 1 ) { 262 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests'), (int)$total_items ) . '</a>';269 return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests'), (int)$total_items ) . '</a>', $total_items ); 263 270 } else { 264 271 $user_fullname = bp_core_global_user_fullname( $item_id ); 265 272 $user_url = bp_core_get_userurl( $item_id ); 266 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s'), $user_fullname ) . '</a>';273 return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s'), $user_fullname ) . '</a>', $user_fullname ); 267 274 } 268 275 break;
Note: See TracChangeset
for help on using the changeset viewer.