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_poll_add_activity) is part of the BuddyPress integration, and it is used to filter the activity object before it is saved into the activity stream. This filter is used only if the method to add activity is set to Own activity.

This filter provides 2 arguments.

Arguments

  • $args: settings for the activity, you can make any changes you want.
  • $poll: created poll object

Making changes using this filter can break the activity saved. Do not use it, unless you understand how activities work.

Example

add_filter('gdpol_buddypress_poll_add_activity', 'custom__poll_add_activity', 10, 2);
function custom__activity_poll_create_activity_text($args, $poll) {
  // modify the $args //
  return $args;
}
1
0
827
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply