Changeset 2077 for trunk/bp-friends/bp-friends-notifications.php
- Timestamp:
- 11/02/2009 07:54:21 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends/bp-friends-notifications.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-notifications.php
r1905 r2077 3 3 function friends_notification_new_request( $friendship_id, $initiator_id, $friend_id ) { 4 4 global $bp; 5 5 6 6 $initiator_name = bp_core_get_user_displayname( $initiator_id ); 7 7 8 8 if ( 'no' == get_usermeta( (int)$friend_id, 'notification_friends_friendship_request' ) ) 9 9 return false; 10 10 11 11 $ud = get_userdata( $friend_id ); 12 12 $initiator_ud = get_userdata( $initiator_id ); 13 13 14 14 $all_requests_link = bp_core_get_user_domain( $friend_id ) . 'friends/requests/'; 15 15 $settings_link = bp_core_get_user_domain( $friend_id ) . 'settings/notifications'; 16 16 17 17 $initiator_link = bp_core_get_user_domain( $initiator_id ); 18 18 … … 21 21 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name ); 22 22 23 $message = sprintf( __( 23 $message = sprintf( __( 24 24 "%s wants to add you as a friend. 25 25 … … 40 40 function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) { 41 41 global $bp; 42 42 43 43 $friendship = new BP_Friends_Friendship( $friendship_id, false, false ); 44 44 45 45 $friend_name = bp_core_get_user_displayname( $friend_id ); 46 46 47 47 if ( 'no' == get_usermeta( (int)$initiator_id, 'notification_friends_friendship_accepted' ) ) 48 48 return false; 49 49 50 50 $ud = get_userdata( $initiator_id ); 51 51 52 52 $friend_link = bp_core_get_user_domain( $friend_id ); 53 $settings_link = bp_core_get_user_domain( $initiator_id ) . 'settings/notifications'; 54 53 $settings_link = bp_core_get_user_domain( $initiator_id ) . 'settings/notifications'; 54 55 55 // Set up and send the message 56 56 $to = $ud->user_email; 57 57 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name ); 58 58 59 $message = sprintf( __( 59 $message = sprintf( __( 60 60 '%s accepted your friend request. 61 61
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)