bpbbpst_list_recipients

List all bbPress moderators that are subscribed to new support topics.

Description

(array) bpbbpst_list_recipients( (int) $forum_id = 0, (string) $context = 'admin' ); 

Returns (array)

of user ids

Parameters (2)

0. $forum_id — Optional. (int)
The forum id.
1. $context — Optional. (string) => 'admin'
Are we using form admin or inside our notify function ?

Usage

  1. if ( !function_exists( 'bpbbpst_list_recipients' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddy-bbpress-support-topic/includes/functions.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = -1; 
  6.  
  7. // are we using form admin or inside our notify function ? 
  8. $context = 'admin'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bpbbpst_list_recipients($forum_id, $context); 
  12.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_list_recipients( $forum_id = 0, $context = 'admin' ) { 
  2.  
  3. if ( empty( $forum_id ) ) { 
  4. return false; 
  5.  
  6. $recipients = get_post_meta( $forum_id, '_bpbbpst_support_recipients', true ); 
  7.  
  8. if ( empty( $recipients ) ) { 
  9. $recipients = array(); 
  10.  
  11. return apply_filters( 'bpbbpst_list_recipients', $recipients, $context, $forum_id );