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_modify_topic_activity_content) 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 adding poll with topic activity content.

This filter provides 4 arguments.


  • $activity_text: this is the activity text generated by the plugin. Filter handling function has to return this value (modified or unmodified)
  • $activity_title: text portion of the activity text, without the HTML wrapper
  • $poll: created poll object
  • $args: settings for the topic activity


add_filter('gdpol_buddypress_modify_topic_activity_content', 'custom__modify_topic_activity_content', 10, 5);
function custom__modify_topic_activity_content($activity_text, $activity_title, $poll, $args) {
  // modify the $activity_text //
  return $activity_text;
Rate this reference

You are not allowed to rate this post.

Leave a Comment