bp_notifications_delete_notification( int $id )
Delete a specific notification by its ID.
Description Description
Parameters Parameters
- $id
-
(Required) ID of the notification to delete.
Return Return
(false|int) True on success, false on failure.
Source 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 Changelog
| Version | Description |
|---|---|
| 1.9.0 | Introduced. |