Changeset 2817
- Timestamp:
- 03/08/2010 03:20:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-friends.php
r2794 r2817 99 99 100 100 // Delete any friendship acceptance notifications for the user when viewing a profile 101 bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, 'friends', 'friendship_accepted' );101 bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' ); 102 102 103 103 do_action( 'friends_screen_my_friends' ); … … 133 133 134 134 do_action( 'friends_screen_requests' ); 135 136 if ( isset( $_GET['new'] ) ) 137 bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_request' ); 135 138 136 139 bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) ); … … 318 321 case 'friendship_request': 319 322 if ( (int)$total_items > 1 ) { 320 return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests " title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests', 'buddypress' ), (int)$total_items ) . '</a>', $total_items );323 return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests/?new" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests', 'buddypress' ), (int)$total_items ) . '</a>', $total_items ); 321 324 } else { 322 325 $user_fullname = bp_core_get_user_displayname( $item_id ); 323 326 $user_url = bp_core_get_user_domain( $item_id ); 324 return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests " title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s', 'buddypress' ), $user_fullname ) . '</a>', $user_fullname );327 return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests/?new" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s', 'buddypress' ), $user_fullname ) . '</a>', $user_fullname ); 325 328 } 326 329 break; … … 363 366 if ( !$force_accept ) { 364 367 // Add the on screen notification 365 bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, 'friends', 'friendship_request' );368 bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' ); 366 369 367 370 // Send the email notification … … 409 412 410 413 /* Remove the friend request notice */ 411 bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_request' );414 bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' ); 412 415 413 416 /* Add a friend accepted notice for the initiating user */ 414 bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_accepted' );417 bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_accepted' ); 415 418 416 419 $initiator_link = bp_core_get_userlink( $friendship->initiator_user_id ); … … 450 453 if ( !$friendship->is_confirmed && BP_Friends_Friendship::reject( $friendship_id ) ) { 451 454 // Remove the friend request notice 452 bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_request' );455 bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' ); 453 456 454 457 do_action( 'friends_friendship_rejected', $friendship_id, &$friendship ); … … 598 601 599 602 /* Remove friendship requests FROM user */ 600 bp_core_delete_notifications_from_user( $user_id, $bp->friends-> slug, 'friendship_request' );603 bp_core_delete_notifications_from_user( $user_id, $bp->friends->id, 'friendship_request' ); 601 604 602 605 do_action( 'friends_remove_data', $user_id ); … … 632 635 633 636 if ( isset($_GET['new']) ) 634 bp_core_delete_notifications_for_user_by_type( $bp-> loggedin_user->id, 'friends', 'friendship_accepted' );637 bp_core_delete_notifications_for_user_by_type( $bp->displayed_user->id, $bp->friends->id, 'friendship_accepted' ); 635 638 } 636 639 add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' );
Note: See TracChangeset
for help on using the changeset viewer.