Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Re-do output bp_activity_content()


Xevo
Participant

@xevo

For the people that are interested, here’s what I ended up doing.

function get_activity_flatline( $content ) {
$striptags = array("<p>", "</p>");
$content2 = str_replace($striptags, "", $content);
$content3 = substr($content2, 0, strpos($content2, '<span class="time-since">'));
return $content3;
}
add_filter( 'bp_get_activity_content', 'get_activity_flatline' );

Not pretty or anything, but it works for me. If you want the time to keep being displayed, change the <span class="time-since"> into

<blockquote>.

Skip to toolbar