Changeset 11278 for trunk/src/bp-groups/bp-groups-notifications.php
- Timestamp:
- 12/08/2016 02:11:17 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-notifications.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-notifications.php
r11091 r11278 968 968 969 969 /** 970 * Mark notifications read when a member's group membership request is granted. 971 * 972 * @since 2.8.0 973 * 974 * @param int $user_id ID of the user. 975 * @param int $group_id ID of the group. 976 */ 977 function bp_groups_accept_request_mark_notifications( $user_id, $group_id ) { 978 if ( bp_is_active( 'notifications' ) ) { 979 // First null parameter marks read for all admins. 980 bp_notifications_mark_notifications_by_item_id( null, $group_id, buddypress()->groups->id, 'new_membership_request', $user_id ); 981 } 982 } 983 add_action( 'groups_membership_accepted', 'bp_groups_accept_request_mark_notifications', 10, 2 ); 984 add_action( 'groups_membership_rejected', 'bp_groups_accept_request_mark_notifications', 10, 2 ); 985 986 /** 970 987 * Mark notifications read when a member views their group memberships. 971 988 *
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)