bbp_activity_topic_create
The bbPress bbp activity topic create hook.
Description
apply_filters( 'bbp_activity_topic_create', (unknown) $activity_text, (unknown) $user_id, (unknown) $topic_id, (unknown) $forum_id );
Parameters (4)
- 0. $activity_text (unknown)
- The activity text.
- 1. $user_id (unknown)
- The user id.
- 2. $topic_id (unknown)
- The topic id.
- 3. $forum_id (unknown)
- The forum id.
Usage
- To run the hook, copy the example below.
- $activity_text = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
- if ( !empty( $activity_text ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bbp_activity_topic_create callback
- function filter_bbp_activity_topic_create( $activity_text, $user_id, $topic_id, $forum_id ) {
- // make filter magic happen here...
- return $activity_text;
- };
- // add the filter
- add_filter( 'bbp_activity_topic_create', 'filter_bbp_activity_topic_create', 10, 4 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bbp_activity_topic_create', 'filter_bbp_activity_topic_create', 10, 4 );
Defined (1)
The filter is defined in the following location(s).
- /includes/extend/buddypress/activity.php
- $activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );