bpln_get_notification_messages

Get a list of processed messages.

Description

bpln_get_notification_messages( $notifications ); 

Parameters (1)

0. $notifications
The notifications.

Usage

  1. if ( !function_exists( 'bpln_get_notification_messages' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-live-notification/functions.php'; 
  3.  
  4. // The notifications. 
  5. $notifications = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bpln_get_notification_messages($notifications); 
  9.  

Defined (1)

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

/functions.php  
  1. function bpln_get_notification_messages( $notifications ) { 
  2.  
  3. $messages = array(); 
  4.  
  5. if ( empty( $notifications ) ) { 
  6. return $messages; 
  7.  
  8. $total_notifications = count( $notifications ); 
  9.  
  10. for ( $i = 0; $i < $total_notifications; $i ++ ) { 
  11.  
  12. $notification = $notifications[ $i ]; 
  13.  
  14. $messages[] = bpln_get_the_notification_description( $notification ); 
  15.  
  16.  
  17.  
  18. return $messages;