gdpol_buddypress_activity_poll_create_activity_text

This filter (gdpol_buddypress_activity_poll_create_activity_text) is part of the BuddyPress integration, and it is used to filter the activity action text saved when the activity for poll creation is executed. This filter is used only if the method to add activity is set to Own activity.

This filter provides 5 arguments.

Arguments

  • $activity_text: this is the activity text generated by the plugin. Filter handling function has to return this value (modified or unmodified)
  • $user_id: ID of the user created the poll
  • $topic_id: ID of the topic poll belongs to
  • $forum_id: ID of the forum topic belongs to
  • $poll: created poll object

Example

add_filter('gdpol_buddypress_activity_poll_create_activity_text', 'custom__activity_poll_create_activity_text', 10, 5);
function custom__activity_poll_create_activity_text($activity_text, $user_id, $topic_id, $forum_id, $poll) {
  // modify the $activity_text //
  return $activity_text;
}
1
0
132
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply