bp_get_activity_comment_user_id()

Return the ID of the author of the activity comment currently being displayed.

Description

Return

(int|bool) $user_id The user_id of the author of the displayed activity comment. False on failure.

Source

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

	function bp_get_activity_comment_user_id() {
		global $activities_template;

		$user_id = isset( $activities_template->activity->current_comment->user_id ) ? $activities_template->activity->current_comment->user_id : false;

		/**
		 * Filters the ID of the author of the activity comment currently being displayed.
		 *
		 * @since BuddyPress 1.5.0
		 *
		 * @param int|bool $user_id ID for the author of the comment currently being displayed.
		 */
		return apply_filters( 'bp_activity_comment_user_id', $user_id );
	}

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.