BP_REST_Notifications_Endpoint::can_see( int $notification_id )
Can this user see the notification?
Description
Parameters
- $notification_id
-
(Required) Notification ID.
Return
(bool)
Source
File: bp-notifications/classes/class-bp-rest-notifications-endpoint.php
protected function can_see( $notification_id = 0 ) { // Check notification access. if ( ! empty( $notification_id ) && (bool) BP_Notifications_Notification::check_access( bp_loggedin_user_id(), $notification_id ) ) { return true; } // Moderators as well. if ( bp_current_user_can( 'bp_moderate' ) ) { return true; } return false; }
Changelog
Version | Description |
---|---|
0.1.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.