bp_groups_delete_promotion_notifications( int $user_id, int $group_id )
When a demotion takes place, delete any corresponding promotion notifications.
Description
Parameters
- $user_id
-
(Required) ID of the user.
- $group_id
-
(Required) ID of the group.
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
| Version | Description |
|---|---|
| BuddyPress 2.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.