bp_activity_get_embed_excerpt( string $content = '' )
Generates excerpt for an activity embed item.
Description
Parameters
- $content
-
(Optional) The content to generate an excerpt for.
Default value: ''
Return
(string)
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 BuddyPress 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 ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.6.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.