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
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 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.