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.


Top ↑

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' );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.