bp_search_activity_intro( $character_limit = 50 )
Returns a trimmed activity content string.
Description
Must be used while inside activity loop
Source
File: bp-search/bp-search-functions.php
function bp_search_activity_intro( $character_limit = 50 ) { $content = ''; if ( bp_activity_has_content() ) { $content = bp_get_activity_content_body(); if ( $content ) { $content = wp_strip_all_tags( $content, true ); $shortened_content = substr( $content, 0, $character_limit ); if ( strlen( $content ) > $character_limit ) { $shortened_content .= '…'; } $content = $shortened_content; } } return apply_filters( 'bp_search_activity_intro', $content ); }
Changelog
Version | Description |
---|---|
BuddyBoss 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.