WordPress filter hook
bp_get_activity_content
Fired by 7 WordPress plugins, running on 2.1M+ sites between them.
“This filter is documented in bp-activity/bp-activity-template.php”
How to use bp_get_activity_content
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'bp_get_activity_content', function( $content ) {
// Change $content here.
return $content;
}, 10, 1 );Argument names come from BuddyPress Edit Activity's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
7 plugins that fire bp_get_activity_content
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
All in One SEO2+ million installs
apply_filters( 'bp_get_activity_content', $this->activity['content'] )app/Common/Standalone/BuddyPress/Component.php:249 -
BuddyPress90,000+ installs
apply_filters( 'bp_get_activity_content', $activities_template->activity->current_comment->content )bp-activity/bp-activity-template.php:2491 -
rtMedia for WordPress, BuddyPress and bbPress7,000+ installs
apply_filters( 'bp_get_activity_content', $comment_string )app/main/controllers/template/rtmedia-functions.php:1546 -
BuddyPress Edit Activity700+ installs
apply_filters( 'bp_get_activity_content', $activity->content )includes/main-class.php:483 -
WPGraphQL BuddyPress10+ installs
apply_filters( 'bp_get_activity_content', $activity->content )src/Type/ObjectType/ActivityType.php:194 -
BuddyPress Backwards Compatibility10+ installs
apply_filters( 'bp_get_activity_content', $_POST['content'] )bp-themes/bp-sn-parent/_inc/ajax.php:541 -
BuddyPress Forums Extras10+ installs
apply_filters( 'bp_get_activity_content', $comment->content )bp-forum-extras-activity.php:144
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.