bp_groups_<amount>_<action>s_notification

Filters groups multiple new membership request notification for string format.

Description

apply_filters( 'bp_groups_<amount>_<action>s_notification', (string) $a_href_notification_link_title_group_membership_requests_buddypress_text_a, (string) $group_link, (number) $total_items, (string) $group_name, (string) $text, (string) $notification_link ); 

This is a dynamic filter that is dependent on item count and action. Complete filter - bp_groups_multiple_new_membership_requests_notification.

Parameters (6)

0. $a_href_notification_link_title_group_membership_requests_buddypress_text_a — Optional. (string) => '' . $text . ''
The href notification link title group membership requests buddypress text a.
1. $group_link (string)
The permalink for the group.
2. $total_items (number)
Total number of membership requests.
3. $group_name (string)
Name of the group.
4. $text (string)
Notification content.
5. $notification_link (string)
The permalink for notification.

Usage

To run the hook, copy the example below.
  1. $a_href_notification_link_title_group_membership_requests_buddypress_text_a = apply_filters( 'bp_groups_{$amount}_{$action}s_notification', $a_href_notification_link_title_group_membership_requests_buddypress_text_a, $group_link, $total_items, $group_name, $text, $notification_link ); 
  2.  
  3. if ( !empty( $a_href_notification_link_title_group_membership_requests_buddypress_text_a ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_groups_<amount>_<action>s_notification callback 
  2. function filter_bp_groups_amount_actions_notification( $a_href_notification_link_title_group_membership_requests_buddypress_text_a, $group_link, $total_items, $group_name, $text, $notification_link ) { 
  3. // make filter magic happen here... 
  4. return $a_href_notification_link_title_group_membership_requests_buddypress_text_a
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "bp_groups_{$amount}_{$action}s_notification", 'filter_bp_groups_amount_actions_notification', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "bp_groups_{$amount}_{$action}s_notification", 'filter_bp_groups_amount_actions_notification', 10, 6 ); 

Defined (2)

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

/bp-groups/bp-groups-notifications.php  
  1. return apply_filters( 'bp_groups_' . $amount . '_' . $action . 's_notification', '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link ); 
  1. return apply_filters( 'bp_groups_' . $amount . '_' . $action . 's_notification', array(