bp_get_activity_comment_content()

Return the content of the activity comment currently being displayed.

Description

The content is run through two filters. ‘bp_get_activity_content’ will apply all filters applied to activity items in general. Use ‘bp_activity_comment_content’ to modify the content of activity comments only.

Return

(string) $content The content of the current activity comment.

Source

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

	function bp_get_activity_comment_content() {
		global $activities_template;

		// scrape off activity content if it contain empty characters only
		if ( in_array( $activities_template->activity->current_comment->content , [ ' ', '​' ] ) ) {
			$activities_template->activity->current_comment->content = '';
		}

		/** This filter is documented in bp-activity/bp-activity-template.php */
		//$content = apply_filters( 'bp_get_activity_content', $activities_template->activity->current_comment->content );
		$content = apply_filters_ref_array( 'bp_get_activity_content', array( $activities_template->activity->current_comment->content, &$activities_template->activity->current_comment ) );


		/**
		 * Filters the content of the current activity comment.
		 *
		 * @since BuddyPress 1.2.0
		 * @since BuddyPress 3.0.0 Added $context parameter to disambiguate from bp_get_activity_comment_content().
		 *
		 * @param string $content The content of the current activity comment.
		 * @param string $context This filter's context ("get").
		 */
		return apply_filters( 'bp_activity_comment_content', $content, 'get' );
	}

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.