Changeset 5712 for trunk/bp-friends/bp-friends-notifications.php
- Timestamp:
- 02/11/2012 04:42:04 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-notifications.php
r5416 r5712 1 1 <?php 2 3 /** 4 * BuddyPress Friends Activity Functions 5 * 6 * These functions handle the recording, deleting and formatting of activity 7 * for the user and for this specific component. 8 * 9 * @package BuddyPress 10 * @subpackage FriendsActivity 11 */ 12 2 13 // Exit if accessed directly 3 14 if ( !defined( 'ABSPATH' ) ) exit; 4 15 5 16 function friends_notification_new_request( $friendship_id, $initiator_id, $friend_id ) { 6 global $bp;7 17 8 18 $initiator_name = bp_core_get_user_displayname( $initiator_id ); … … 11 21 return false; 12 22 13 $ud = get_userdata( $friend_id ); 14 $initiator_ud = get_userdata( $initiator_id ); 15 23 $ud = get_userdata( $friend_id ); 16 24 $all_requests_link = bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/'; 17 $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';18 $settings_link = trailingslashit( bp_core_get_user_domain( $friend_id ) . $settings_slug . '/notifications' );19 $initiator_link = bp_core_get_user_domain( $initiator_id );25 $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 26 $settings_link = trailingslashit( bp_core_get_user_domain( $friend_id ) . $settings_slug . '/notifications' ); 27 $initiator_link = bp_core_get_user_domain( $initiator_id ); 20 28 21 29 // Set up and send the message … … 47 55 48 56 function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) { 49 global $bp;50 51 $friendship = new BP_Friends_Friendship( $friendship_id, false, false );52 57 53 58 $friend_name = bp_core_get_user_displayname( $friend_id ); 54 59 55 if ( 'no' == bp_get_user_meta( (int) $initiator_id, 'notification_friends_friendship_accepted', true ) )60 if ( 'no' == bp_get_user_meta( (int) $initiator_id, 'notification_friends_friendship_accepted', true ) ) 56 61 return false; 57 62 58 $ud = get_userdata( $initiator_id ); 59 63 $ud = get_userdata( $initiator_id ); 60 64 $friend_link = bp_core_get_user_domain( $friend_id ); 61 65 $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
Note: See TracChangeset
for help on using the changeset viewer.