Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

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.


  • $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


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;
Rate this reference

You are not allowed to rate this post.

Leave a Comment