bp_groups_format_activity_action_created_group( string $action, object $activity )

Format ‘created_group’ activity actions.

Description

Parameters

$action

(Required) Static activity action.

$activity

(Required) Activity data object.

Return

(string)

Source

File: bp-groups/bp-groups-activity.php

function bp_groups_format_activity_action_created_group( $action, $activity ) {
	$user_link = bp_core_get_userlink( $activity->user_id );

	$group      = groups_get_group( $activity->item_id );
	$group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>';

	$action = sprintf( __( '%1$s created the group %2$s', 'buddyboss'), $user_link, $group_link );

	/**
	 * Filters the 'created_group' activity actions.
	 *
	 * @since BuddyPress 1.2.0
	 *
	 * @param string $action   The 'created_group' activity action.
	 * @param object $activity Activity data object.
	 */
	return apply_filters( 'groups_activity_created_group_action', $action, $activity );
}

Changelog

Changelog
Version Description
BuddyPress 2.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.