Clanbite Social Kit REST

apply_filters( 'clanbite_social_kit_activity_card_html', string $html, string|null $activity_type, object $row, array|null $team_payload, array|null $target_user, int $viewer_id )

Filter the activity card HTML for custom activity types.

Third-party developers can use this to render custom activity cards for their own activity types.

Filter PHP

Parameters

$html (string)

Default HTML (empty string).

$activity_type (string|null)

Activity type slug.

$row (object)

Database row.

$team_payload (array|null)

Team data if available.

$target_user (array|null)

Target user data if available.

$viewer_id (int)

Current viewer user ID.

Example

add_filter( 'clanbite_social_kit_activity_card_html', function ( $html, $activity_type, $row, $team_payload, $target_user, $viewer_id ) {
	// Change $html here.
	return $html;
}, 10, 6 );

Defined in inc/Rest/Rest_Controller.php