Created
September 9, 2020 18:07
-
-
Save scottopolis/4268054f1efb08958f645bc941a9ca92 to your computer and use it in GitHub Desktop.
AppCommunity Activity Type Filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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