Opened 10 years ago
Closed 10 years ago
#5680 closed enhancement (fixed)
Pass parameters to bp_blogs_record_activity_content
Reported by: | rogercoathup | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
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 );
to:
$content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $content ), $content, $r );
Looks good to me.