bp_members_signups_count_query

Filters the Signups count query.

Description

apply_filters( 'bp_members_signups_count_query', (string) $join, (array) $sql, (array) $args, (array) $r ); 

Parameters (4)

0. $join (string) => join( ' ', $sql )
SQL statement.
1. $sql (array)
Array of SQL statement parts.
2. $args (array)
Array of original arguments for get() method.
3. $r (array)
Array of parsed arguments for get() method.

Usage

To run the hook, copy the example below.
  1. $join = apply_filters( 'bp_members_signups_count_query', $join, $sql, $args, $r ); 
  2.  
  3. if ( !empty( $join ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_members_signups_count_query callback 
  2. function filter_bp_members_signups_count_query( $join, $sql, $args, $r ) { 
  3. // make filter magic happen here... 
  4. return $join
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_members_signups_count_query', 'filter_bp_members_signups_count_query', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_members_signups_count_query', 'filter_bp_members_signups_count_query', 10, 4 ); 

Defined (1)

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

/bp-members/classes/class-bp-signup.php  
  1. $total_signups = $wpdb->get_var( apply_filters( 'bp_members_signups_count_query', join( ' ', $sql ), $sql, $args, $r ) );