bp_get_activity_content_body()
Return the activity content body.
Description
Return
(string) The activity content body.
Source
File: bp-activity/bp-activity-template.php
function bp_get_activity_content_body() {
global $activities_template;
// Backwards compatibility if action is not being used.
if ( empty( $activities_template->activity->action ) && ! empty( $activities_template->activity->content ) ) {
$activities_template->activity->content = bp_insert_activity_meta( $activities_template->activity->content );
}
// scrape off activity content if it contain empty characters only
if ( in_array( $activities_template->activity->content, [ ' ', '​' ] ) ) {
$activities_template->activity->content = '';
}
/**
* Filters the activity content body.
*
* @since BuddyPress 1.2.0
*
* @param string $content Content body.
* @param object $activity Activity object. Passed by reference.
*/
return apply_filters_ref_array( 'bp_get_activity_content_body', array( $activities_template->activity->content, &$activities_template->activity ) );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.2.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.