bp_activity_format_activity_action_activity_comment( string $action, object $activity )

Format ‘activity_comment’ activity actions.

Parameters Parameters


(string) (Required) Static activity action.


(object) (Required) Activity data object.

Top ↑

Return Return

(string) $action

Source Source

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

function bp_activity_format_activity_action_activity_comment( $action, $activity ) {
	$action = sprintf(
		/* translators: %s: the activity author user link */
		esc_html__( '%s posted a new activity comment', 'buddypress' ),
		bp_core_get_userlink( $activity->user_id )

	 * Filters the formatted activity action comment string.
	 * @since 1.2.0
	 * @param string               $action   Activity action string value.
	 * @param BP_Activity_Activity $activity Activity item object.
	return apply_filters( 'bp_activity_comment_action', $action, $activity );

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.