Changeset 12437 for trunk/src/bp-groups/bp-groups-notifications.php
- Timestamp:
- 08/12/2019 08:45:04 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-notifications.php
r12429 r12437 962 962 } 963 963 add_action( 'groups_delete_group', 'bp_groups_delete_group_delete_all_notifications', 10 ); 964 965 /** 966 * Remove Group invite notification when a user is uninvited. 967 * 968 * @since 5.0.0 969 * 970 * @param int $group_id ID of the group being uninvited from. 971 * @param int $user_id ID of the user being uninvited. 972 */ 973 function bp_groups_uninvite_user_delete_group_invite_notification( $group_id = 0, $user_id = 0 ) { 974 if ( ! bp_is_active( 'notifications' ) || ! $group_id || ! $user_id ) { 975 return; 976 } 977 978 bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'group_invite' ); 979 } 980 add_action( 'groups_uninvite_user', 'bp_groups_uninvite_user_delete_group_invite_notification', 10, 2 ); 964 981 965 982 /**
Note: See TracChangeset
for help on using the changeset viewer.