Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 07:54:21 PM (17 years ago)
Author:
apeatling
Message:

Merging 1.1 branch changes and syncing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-notifications.php

    r1905 r2077  
    33function friends_notification_new_request( $friendship_id, $initiator_id, $friend_id ) {
    44        global $bp;
    5        
     5
    66        $initiator_name = bp_core_get_user_displayname( $initiator_id );
    77
    88        if ( 'no' == get_usermeta( (int)$friend_id, 'notification_friends_friendship_request' ) )
    99                return false;
    10        
     10
    1111        $ud = get_userdata( $friend_id );
    1212        $initiator_ud = get_userdata( $initiator_id );
    13        
     13
    1414        $all_requests_link = bp_core_get_user_domain( $friend_id ) . 'friends/requests/';
    1515        $settings_link = bp_core_get_user_domain( $friend_id ) . 'settings/notifications';
    16        
     16
    1717        $initiator_link = bp_core_get_user_domain( $initiator_id );
    1818
     
    2121        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
    2222
    23         $message = sprintf( __( 
     23        $message = sprintf( __(
    2424"%s wants to add you as a friend.
    2525
     
    4040function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) {
    4141        global $bp;
    42        
     42
    4343        $friendship = new BP_Friends_Friendship( $friendship_id, false, false );
    44        
     44
    4545        $friend_name = bp_core_get_user_displayname( $friend_id );
    4646
    4747        if ( 'no' == get_usermeta( (int)$initiator_id, 'notification_friends_friendship_accepted' ) )
    4848                return false;
    49        
     49
    5050        $ud = get_userdata( $initiator_id );
    51        
     51
    5252        $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
    5555        // Set up and send the message
    5656        $to = $ud->user_email;
    5757        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
    5858
    59         $message = sprintf( __( 
     59        $message = sprintf( __(
    6060'%s accepted your friend request.
    6161
Note: See TracChangeset for help on using the changeset viewer.