bp_activity_get_comments_user_ids

Return the IDs of every user who's left a comment on the current activity item.

Description

(bool|array) bp_activity_get_comments_user_ids(); 

Returns (bool|array)

An array of IDs, or false if none are found.


Usage

  1. if ( !function_exists( 'bp_activity_get_comments_user_ids' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_get_comments_user_ids(); 
  7.  

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. function bp_activity_get_comments_user_ids() { 
  2. global $activities_template; 
  3.  
  4. $user_ids = ! empty( $activities_template->activity->children ) 
  5. ? (array) bp_activity_recurse_comments_user_ids( $activities_template->activity->children ) 
  6. : array(); 
  7.  
  8. /** 
  9. * Filters the list of user IDs for the current activity item. 
  10. * @since 1.7.0 
  11. * @param array $value Array of unique user IDs for the current activity item. 
  12. */ 
  13. return apply_filters( 'bp_activity_get_comments_user_ids', array_unique( $user_ids ) );