$filter

  • apply_filters( $filter, '<a href="' . $link . '">' . $text . '</a>', (int)$total_items )

    Source Reference:

    • Component: BuddyPress :: bp-friends
      File: /bp-friends/bp-friends-activity.php :: Trac Source Line: 102
      				$text = sprintf( __( 'You have a friendship request from %s', 'buddypress' ),  bp_core_get_user_displayname( $item_id ) );
      				$filter = 'bp_friends_single_friendship_request_notification';
      			}
      
      			break;
      	}
      
      	// Return either an HTML link or an array, depending on the requested format
      	if ( 'string' == $format ) {
      		$return = apply_filters( $filter, '<a href="' . $link . '">' . $text . '</a>', (int)$total_items );
      	} else {
      		$return = apply_filters( $filter, array(
      			'link' => $link,
      			'text' => $text
      		), (int)$total_items );
      	}
      
      	do_action( 'friends_format_notifications', $action, $item_id, $secondary_item_id, $total_items, $return );
      
      	return $return;
      
  • apply_filters( $filter, '<a href="' . $link . '" title="' . $title . '">' . $text . '</a>', (int)$total_items, $text, $link )

    Source Reference:

    • Component: BuddyPress :: bp-messages
      File: /bp-messages/bp-messages-functions.php :: Trac Source Line: 249
      			$text = sprintf( __('You have %d new messages', 'buddypress' ), (int)$total_items );
      			$filter = 'bp_messages_multiple_new_message_notification';
      		} else {
      			$text = sprintf( __('You have %d new message', 'buddypress' ), (int)$total_items );
      			$filter = 'bp_messages_single_new_message_notification';
      		}
      	}
      
      	if ( 'string' == $format ) {
      		$return = apply_filters( $filter, '<a href="' . $link . '" title="' . $title . '">' . $text . '</a>', (int)$total_items, $text, $link );
      	} else {
      		$return = apply_filters( $filter, array(
      			'text' => $text,
      			'link' => $link
      		), $link, (int)$total_items, $text, $link );
      	}
      
      	do_action( 'messages_format_notifications', $action, $item_id, $secondary_item_id, $total_items );
      
      	return $return;
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 98
      			// Set up the string and the filter
      			// Because different values are passed to the filters, we'll return the
      			// values inline
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( '%1$d new membership requests for the group "%2$s"', 'buddypress' ), (int)$total_items, $group->name );
      				$filter = 'bp_groups_multiple_new_membership_requests_notification';
      				$notification_link = $group_link . 'admin/membership-requests/?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$user_fullname = bp_core_get_user_displayname( $requesting_user_id );
      				$text = sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname );
      				$filter = 'bp_groups_single_new_membership_request_notification';
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname ) . '">' . $text . '</a>', $group_link, $user_fullname, $group->name, $text, $notification_

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 112
      					), $group_link, $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$user_fullname = bp_core_get_user_displayname( $requesting_user_id );
      				$text = sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname );
      				$filter = 'bp_groups_single_new_membership_request_notification';
      				$notification_link = $group_link . 'admin/membership-requests/?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname ) . '">' . $text . '</a>', $group_link, $user_fullname, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $user_fullname, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 135
      			$group = new BP_Groups_Group( $group_id );
      			$group_link = bp_get_group_permalink( $group );
      
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( '%d accepted group membership requests', 'buddypress' ), (int)$total_items, $group->name );
      				$filter = 'bp_groups_multiple_membership_request_accepted_notification';
      				$notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'Membership for group "%s" accepted', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_membership_request_accepted_notification';
      				$notification_link = $group_link . '?n=1';
      
  • apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 148
      						'text' => $text
      					), $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'Membership for group "%s" accepted', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_membership_request_accepted_notification';
      				$notification_link = $group_link . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 184
      						'text' => $text
      					), $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'Membership for group "%s" rejected', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_membership_request_rejected_notification';
      				$notification_link = $group_link . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 220
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You were promoted to an admin in the group "%s"', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_member_promoted_to_admin_notification';
      				$notification_link = $group_link . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 256
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You were promoted to a mod in the group "%s"', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_member_promoted_to_mod_notification';
      				$notification_link = $group_link . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 291
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You have an invitation to the group: %s', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_group_invite_notification';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $group_link, $group->name, $text, $notification_link );
      				}
      			}
      
      			break;
      	}
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 171
      			$group = new BP_Groups_Group( $group_id );
      			$group_link = bp_get_group_permalink( $group );
      
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( '%d rejected group membership requests', 'buddypress' ), (int)$total_items, $group->name );
      				$filter = 'bp_groups_multiple_membership_request_rejected_notification';
      				$notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $group->name, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'Membership for group "%s" rejected', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_membership_request_rejected_notification';
      				$notification_link = $group_link . '?n=1';
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 207
      			$group = new BP_Groups_Group( $group_id );
      			$group_link = bp_get_group_permalink( $group );
      
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( 'You were promoted to an admin in %d groups', 'buddypress' ), (int)$total_items );
      				$filter = 'bp_groups_multiple_member_promoted_to_admin_notification';
      				$notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You were promoted to an admin in the group "%s"', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_member_promoted_to_admin_notification';
      				$notification_link = $group_link . '?n=1';
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 243
      			$group = new BP_Groups_Group( $group_id );
      			$group_link = bp_get_group_permalink( $group );
      
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( 'You were promoted to a mod in %d groups', 'buddypress' ), (int)$total_items );
      				$filter = 'bp_groups_multiple_member_promoted_to_mod_notification';
      				$notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '?n=1';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You were promoted to a mod in the group "%s"', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_member_promoted_to_mod_notification';
      				$notification_link = $group_link . '?n=1';
      
  • apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Invites', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 279
      			$group_link = bp_get_group_permalink( $group );
      
      			$notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/?n=1';
      
      			if ( (int)$total_items > 1 ) {
      				$text = sprintf( __( 'You have %d new group invitations', 'buddypress' ), (int)$total_items );
      				$filter = 'bp_groups_multiple_group_invite_notification';
      
      				if ( 'string' == $format ) {
      					return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Invites', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
      				} else {
      					return apply_filters( $filter, array(
      						'link' => $notification_link,
      						'text' => $text
      					), $total_items, $text, $notification_link );
      				}
      			} else {
      				$text = sprintf( __( 'You have an invitation to the group: %s', 'buddypress' ), $group->name );
      				$filter = 'bp_groups_single_group_invite_notification';
      
  • apply_filters( $filter, '<a href="' . $at_mention_link . '" title="' . $at_mention_title . '">' . $text . '</a>', $at_mention_link, (int)$total_items, $activity_id, $poster_user_id )

    Source Reference:

    • Component: BuddyPress :: bp-activity
      File: /bp-activity/bp-activity-functions.php :: Trac Source Line: 165
      			} else {
      				$user_fullname = bp_core_get_user_displayname( $poster_user_id );
      				$text =  sprintf( __( '%1$s mentioned you in an activity update', 'buddypress' ), $user_fullname );
      				$filter = 'bp_activity_single_at_mentions_notification';
      			}
      		break;
      	}
      
      	if ( 'string' == $format ) {
      		$return = apply_filters( $filter, '<a href="' . $at_mention_link . '" title="' . $at_mention_title . '">' . $text . '</a>', $at_mention_link, (int)$total_items, $activity_id, $poster_user_id );
      	} else {
      		$return = apply_filters( $filter, array(
      			'text' => $text,
      			'link' => $at_mention_link
      		), $at_mention_link, (int)$total_items, $activity_id, $poster_user_id );
      	}
      
      	do_action( 'activity_format_notifications', $action, $item_id, $secondary_item_id, $total_items );
      
      	return $return;
      

Hook: add_filter: $filter instances (3)

  • add_filter( $filter, 'esc_html',       1 )
    $tag: $filter
    $function_to_add: esc_html
    $priority: 1
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-filters.php :: Trac Source Line: 38
      		'bp_get_signup_with_blog_value',
      		'bp_get_signup_blog_url_value',
      		'bp_get_signup_blog_title_value',
      		'bp_get_signup_blog_privacy_value',
      		'bp_get_signup_avatar_dir_value',
      	);
      
      	// Add the filters to each field
      	foreach( $fields as $filter ) {
      		add_filter( $filter, 'esc_html',       1 );
      		add_filter( $filter, 'wp_filter_kses', 2 );
      		add_filter( $filter, 'stripslashes',   3 );
      	}
      
      	// Sanitize email
      	add_filter( 'bp_get_signup_email_value', 'sanitize_email' );
      }
      add_action( 'bp_loaded', 'bp_members_signup_sanitization' );
      
      ?>
  • add_filter( $filter, 'wp_filter_kses', 2 )
    $tag: $filter
    $function_to_add: wp_filter_kses
    $priority: 2
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-filters.php :: Trac Source Line: 39
      		'bp_get_signup_blog_url_value',
      		'bp_get_signup_blog_title_value',
      		'bp_get_signup_blog_privacy_value',
      		'bp_get_signup_avatar_dir_value',
      	);
      
      	// Add the filters to each field
      	foreach( $fields as $filter ) {
      		add_filter( $filter, 'esc_html',       1 );
      
  • add_filter( $filter, 'stripslashes',   3 )
    $tag: $filter
    $function_to_add: stripslashes
    $priority: 3
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-filters.php :: Trac Source Line: 40
      		'bp_get_signup_blog_title_value',
      		'bp_get_signup_blog_privacy_value',
      		'bp_get_signup_avatar_dir_value',
      	);
      
      	// Add the filters to each field
      	foreach( $fields as $filter ) {
      		add_filter( $filter, 'esc_html',       1 );
      

Comments are closed.