bp_blogs_record_activity_content
Filters the content associated with activity for activity stream.
Description
apply_filters( 'bp_blogs_record_activity_content', (string) $bp_activity_create_summary, (string) $r_content, (array) $r );
Parameters (3)
- 0. $bp_activity_create_summary (string) =>
bp_activity_create_summary( $r['content'], $r )
- Generated summary from content for the activity stream.
- 1. $r_content (string)
- Content for the activity stream.
- 2. $r (array)
- Array of arguments used for the activity stream item.
Usage
- To run the hook, copy the example below.
- $bp_activity_create_summary = apply_filters( 'bp_blogs_record_activity_content', $bp_activity_create_summary, $r_content, $r );
- if ( !empty( $bp_activity_create_summary ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_blogs_record_activity_content callback
- function filter_bp_blogs_record_activity_content( $bp_activity_create_summary, $r_content, $r ) {
- // make filter magic happen here...
- return $bp_activity_create_summary;
- };
- // add the filter
- add_filter( 'bp_blogs_record_activity_content', 'filter_bp_blogs_record_activity_content', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_blogs_record_activity_content', 'filter_bp_blogs_record_activity_content', 10, 3 );
Defined (4)
The filter is defined in the following location(s).
- /bp-blogs/bp-blogs-activity.php
- $r['content'] = apply_filters( 'bp_blogs_record_activity_content', bp_activity_create_summary( $r['content'], $r ), $r['content'], $r );
- /bp-activity/bp-activity-functions.php
- $activity_args['content'] = apply_filters( 'bp_blogs_record_activity_content', $activity_summary, $activity_args['content'], $activity_args, $post->post_type );
- $activity->content = apply_filters( 'bp_blogs_record_activity_content', $activity_summary, $post->post_content, (array) $activity, $post->post_type );
- $activity_args['content'] = apply_filters( 'bp_blogs_record_activity_content', $activity_summary, $activity_args['content'], $activity_args, $post_type );