bp_notifications_get_notification

Get a specific notification by its ID.

Description

(BP_Notifications_Notification) bp_notifications_get_notification( (int) $id ); 

Returns (BP_Notifications_Notification)

Notification object for ID specified.

Parameters (1)

0. $id (int)
ID of the notification.

Usage

  1. if ( !function_exists( 'bp_notifications_get_notification' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-notifications/bp-notifications-functions.php'; 
  3.  
  4. // ID of the notification. 
  5. $id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_notifications_get_notification($id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-notifications/bp-notifications-functions.php  
  1. function bp_notifications_get_notification( $id ) { 
  2. return new BP_Notifications_Notification( $id );