bp_get_activity_feed_item_title()
Return the activity feed item title.
Description
Return
(string) $title The activity feed item title.
Source
File: bp-activity/bp-activity-template.php
function bp_get_activity_feed_item_title() { global $activities_template; if ( !empty( $activities_template->activity->action ) ) { $content = $activities_template->activity->action; } else { $content = $activities_template->activity->content; } $content = explode( '<span', $content ); $title = strip_tags( ent2ncr( trim( convert_chars( $content[0] ) ) ) ); if ( ':' === substr( $title, -1 ) ) { $title = substr( $title, 0, -1 ); } if ( 'activity_update' === $activities_template->activity->type ) { $title .= ': ' . strip_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, array( 'ending' => " […]" ) ) ) ) ) ); } /** * Filters the activity feed item title. * * @since BuddyPress 1.0.0 * * @param string $title The title for the activity feed item. */ return apply_filters( 'bp_get_activity_feed_item_title', $title ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.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.