bp_activity_get_embed_excerpt( string $content = '' )

Generates excerpt for an activity embed item.


Description Description


Parameters Parameters

$content

(Optional) The content to generate an excerpt for.

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	function bp_activity_get_embed_excerpt( $content = '' ) {
		if ( empty( $content ) && ! empty( $GLOBALS['activities_template']->in_the_loop ) ) {
			$content = $GLOBALS['activities_template']->activity->content;
		}

		/*
		 * bp_activity_truncate_entry() includes the 'Read More' link, which is why
		 * we're using this instead of bp_create_excerpt().
		 */
		$content = html_entity_decode( $content );
		$content = bp_activity_truncate_entry( $content, array(
			'html' => false,
			'filter_shortcodes' => true,
			'strip_tags'        => true,
			'force_truncate'    => true
		) );

		/**
		 * Filter the activity embed excerpt.
		 *
		 * @since 2.6.0
		 *
		 * @var string $content Embed Excerpt.
		 * @var string $unmodified_content Unmodified activity content.
		 */
		return apply_filters( 'bp_activity_get_embed_excerpt', $content, $GLOBALS['activities_template']->activity->content );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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