Changeset 7652
- Timestamp:
- 12/07/2013 09:27:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-notifications.php
r7624 r7652 60 60 61 61 if ( bp_is_active( 'notifications' ) ) { 62 bp_notifications_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id ); 62 bp_notifications_add_notification( array( 63 'user_id' => $admin_id, 64 'item_id' => $requesting_user_id, 65 'secondary_item_id' => $group_id, 66 'component_name' => buddypress()->groups->id, 67 'component_action' => 'new_membership_request' 68 ) ); 63 69 } 64 70 … … 111 117 // Post a screen notification first. 112 118 if ( bp_is_active( 'notifications' ) ) { 113 if ( $accepted ) { 114 bp_notifications_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_accepted' ); 115 } else { 116 bp_notifications_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' ); 117 } 119 120 $type = ! empty( $accepted ) ? 'membership_request_accepted' : 'membership_request_rejected' ; 121 122 bp_notifications_add_notification( array( 123 'user_id' => $requesting_user_id, 124 'item_id' => $group_id, 125 'component_name' => buddypress()->groups->id, 126 'component_action' => $type 127 ) ); 118 128 } 119 129 … … 182 192 // Post a screen notification first. 183 193 if ( bp_is_active( 'notifications' ) ) { 184 bp_notifications_add_notification( $group_id, $user_id, 'groups', $type ); 194 bp_notifications_add_notification( array( 195 'user_id' => $user_id, 196 'item_id' => $group_id, 197 'component_name' => buddypress()->groups->id, 198 'component_action' => $type, 199 'date_notified' => bp_core_current_time(), 200 'is_new' => 1, 201 ) ); 185 202 } 186 203 … … 235 252 // Post a screen notification first. 236 253 if ( bp_is_active( 'notifications' ) ) { 237 bp_notifications_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' ); 254 bp_notifications_add_notification( array( 255 'user_id' => $invited_user_id, 256 'item_id' => $group->id, 257 'component_name' => buddypress()->groups->id, 258 'component_action' => 'group_invite' 259 ) ); 238 260 } 239 261 … … 593 615 function bp_groups_screen_group_admin_requests_mark_notifications( $group_id ) { 594 616 if ( bp_is_active( 'notifications' ) ) { 595 bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), $group_id, 'new_membership_request' );617 bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->groups->id, 'new_membership_request' ); 596 618 } 597 619 }
Note: See TracChangeset
for help on using the changeset viewer.