bp_groups_delete_promotion_notifications( int $user_id, int $group_id )
When a demotion takes place, delete any corresponding promotion notifications.
Description Description
Parameters Parameters
- $user_id
-
(Required) ID of the user.
- $group_id
-
(Required) ID of the group.
Source Source
File: bp-groups/bp-groups-notifications.php
function bp_groups_delete_promotion_notifications( $user_id = 0, $group_id = 0 ) { if ( bp_is_active( 'notifications' ) && ! empty( $group_id ) && ! empty( $user_id ) ) { bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_admin' ); bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_mod' ); } }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |