WordPress filter hook

groups_activity_new_update_action

Fired by 4 WordPress plugins, running on 93K+ sites between them.

“Filters the action for the new group activity update.”

How to use groups_activity_new_update_action

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'groups_activity_new_update_action', function( $activity_action ) {
	// Change $activity_action here.
	return $activity_action;
}, 10, 1 );

Argument names come from MediaPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

4 plugins that fire groups_activity_new_update_action

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. BuddyPress icon BuddyPress90,000+ installs apply_filters_deprecated( 'groups_activity_new_update_action', array( $action ), '5.0.0', 'bp_groups_format_activity_action_group_activity_update' ) bp-groups/bp-groups-activity.php:246
  2. MediaPress icon MediaPress3,000+ installs apply_filters( 'groups_activity_new_update_action', $activity_action ) modules/buddypress/activity/mpp-activity-functions.php:938
  3. BP Event Manager icon BP Event Manager10+ installs apply_filters( 'groups_activity_new_update_action', sprintf(__('%1$s created an event in %2$s', 'buddypress'), bp_core_get_userlink(get_current_user_id()), '<a href="' . bp_get_group_permalink(groups_get_group($group)) . '">' . esc_attr(bp_get_group_name(groups_get_group($group))) . '</a>') ) bpem-front/bpem-event-form-response.php:77
  4. BuddyPress Activity Stream AtGroups icon BuddyPress Activity Stream AtGroups10+ installs apply_filters( 'groups_activity_new_update_action', $activity_action ) bp-activity-atgroups.php:111

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.