bp_get_activity_comment_name()

Return the author name for the activity comment currently being displayed.

Description

The use of the ‘bp_acomment_name’ filter is deprecated. Please use ‘bp_activity_comment_name’.

Return

(string) $name The full name of the activity comment author.

Source

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

	function bp_get_activity_comment_name() {
		global $activities_template;

		if ( isset( $activities_template->activity->current_comment->user_fullname ) ) {

			$name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment );  // Backward compatibility.
		} else {
			$name = $activities_template->activity->current_comment->display_name;
		}

		/**
		 * Filters the name of the author for the activity comment.
		 *
		 * @since BuddyPress 1.5.0
		 *
		 * @param string $name Name to be displayed with the activity comment.
		 */
		return apply_filters( 'bp_activity_comment_name', $name );
	}

Changelog

Changelog
Version Description
BuddyPress 1.5.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.