Skip to content

Instantly share code, notes, and snippets.

@scottopolis
Created September 9, 2020 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottopolis/4268054f1efb08958f645bc941a9ca92 to your computer and use it in GitHub Desktop.
Save scottopolis/4268054f1efb08958f645bc941a9ca92 to your computer and use it in GitHub Desktop.
AppCommunity Activity Type Filter
<?php
// this code needs to go in a plugin
add_filter('bp_rest_activity_get_items_query_args', function( $args, $request ) {
// you can change the default value of activity type
$args['filter']['action'] = array('new_blog_post', 'activity_update');
return $args;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment