Last active
July 12, 2022 02:58
-
-
Save KaineLabs/0fcddc13714f1a7cac1624aea99a830f to your computer and use it in GitHub Desktop.
BuddyPress - Hide Group Activities in Global Feed
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 | |
/** | |
* BuddyPress - Hide Group Activities in Global Feed | |
*/ | |
function yzc_hide_group_activity_args( $args ) { | |
if ( ! bp_is_activity_directory() ) { | |
return $args; | |
} | |
$args['filter_query'] = array( | |
array( | |
'column' => 'component', | |
'value' => 'groups', | |
'compare' => '!=' | |
) | |
); | |
return $args; | |
} | |
add_filter( 'bp_after_has_activities_parse_args', 'yzc_hide_group_activity_args', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment