bp_get_group_reject_invite_link

Generate the URL for rejecting an invitation to a group.

Description

(string) bp_get_group_reject_invite_link( (bool) $group = false ); 

Returns (string)

Parameters (1)

0. $group — Optional. (bool) => false
Group object. Default: Current group in the loop.

Usage

  1. if ( !function_exists( 'bp_get_group_reject_invite_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-groups/bp-groups-template.php'; 
  3.  
  4. // Optional. Group object. 
  5. // Default: Current group in the loop. 
  6. $group = false; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = bp_get_group_reject_invite_link($group); 
  10.  

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. function bp_get_group_reject_invite_link( $group = false ) { 
  2. global $groups_template; 
  3.  
  4. if ( empty( $group ) ) { 
  5. $group =& $groups_template->group; 
  6.  
  7. $bp =buddypress); 
  8.  
  9. /** 
  10. * Filters the URL for rejecting an invitation to a group. 
  11. * @since 1.0.0 
  12. * @since 2.5.0 Added the `$group` parameter. 
  13. * @param string $value URL for rejecting an invitation to a group. 
  14. * @param object $group Group object. 
  15. */ 
  16. return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/reject/' . $group->id ), 'groups_reject_invite' ), $group );