bp_registration_hide_widget_members

Removes pending users from member listings.

Description

(array) bp_registration_hide_widget_members( (array) $r = array() ); 

Returns (array)

$r Amended query args.

Parameters (1)

0. $r — Optional. (array) => array()
Query args for member list.

Usage

  1. if ( !function_exists( 'bp_registration_hide_widget_members' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/includes/core.php'; 
  3.  
  4. // Query args for member list. 
  5. $r = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_registration_hide_widget_members($r); 
  9.  

Defined (1)

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

/includes/core.php  
  1. function bp_registration_hide_widget_members( $r = array() ) { 
  2.  
  3. if ( empty( $exclude_me ) ) { 
  4. return $r; 
  5.  
  6. if ( ! is_active_widget( false, false, 'bp_core_members_widget', true ) ) { 
  7. return $r; 
  8.  
  9. $excluded = array(); 
  10.  
  11. foreach ( $exclude_me as $exclude ) { 
  12. $excluded[] = $exclude->user_id; 
  13.  
  14. // Prevent overwriting of existing exclude values. 
  15. if ( empty( $r['exclude'] ) ) { 
  16. $r['exclude'] = implode( ', ', $excluded ); 
  17. } else { 
  18. $r['exclude'] .= ', ' . implode( ', ', $excluded ); 
  19.  
  20. return $r;