bp_get_groups_action_link

Filters a URL for a group component action.

Description

apply_filters( 'bp_get_groups_action_link', (string) $url, (string) $action, (string) $query_args, (bool) $nonce ); 

Parameters (4)

0. $url (string)
URL for a group component action.
1. $action (string)
Action being taken for the group.
2. $query_args (string)
Query arguments being passed.
3. $nonce (bool)
Whether or not to add a nonce.

Usage

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

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. return apply_filters( 'bp_get_groups_action_link', $url, $action, $query_args, $nonce );