Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Activity Filters
<?php
/**
* Remove Activity Filters.
*/
add_filter( 'bp_get_activity_show_filters_options', 'yzc_remove_activity_filters', 999 );
function yzc_remove_activity_filters( $filters ) {
// Get Forbidden Post Types.
$posts_types = array( 'activity_giphy', 'activity_update', 'activity_link' );
foreach ( $posts_types as $type ) {
if ( isset( $filters[ $type ] ) ) {
unset( $filters[ $type ] );
}
}
return $filters;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment