bp_notifications_delete_notification( int $id )
Delete a specific notification by its ID.
Description
Parameters
- $id
-
(Required) ID of the notification to delete.
Return
(false|int) True on success, false on failure.
Source
File: bp-notifications/bp-notifications-functions.php
function bp_notifications_delete_notification( $id ) {
if ( ! bp_notifications_check_notification_access( bp_displayed_user_id(), $id ) ) {
return false;
}
return BP_Notifications_Notification::delete( array( 'id' => $id ) );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.9.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.