Skip to:

Opened 10 years ago

Closed 10 years ago

#5680 closed enhancement (fixed)

Pass parameters to bp_blogs_record_activity_content

Reported by: rogercoathup's profile rogercoathup Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords:


At present, the 'bp_blogs_record_activity_content' filter is very limited in the options it allows for content filtering -- it's passed the content string, but none of the useful parameters like primary_link. This makes it impossible to do anything but the most basic filtering of the content.

For example, we'd find it highly desirable to change the unlinked [...] (at the end of the post excerpt in the activity stream) to a linked [read more]. However, this is not possible because the primary_link and other fields are not passed to the filter.

This should be simple to amend / enhance, by adding an additional parameter to pass the parameters array to filters hooked onto bp_blogs_record_activity_content.

i.e. change line 294 of bp-blogs-activity.php from:

$content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $content ), $content );


$content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $content ), $content, $r );

Change History (2)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.1

Looks good to me.

#2 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8473:

Pass function parameters to 'bp_blogs_record_activity_content' filter

Fixes #5680

Props rogercoathup

Note: See TracTickets for help on using tickets.