Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active April 26, 2020 23:40
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 KaineLabs/fb1dfb3a12f730f5c070c5d91753ed4d to your computer and use it in GitHub Desktop.
Save KaineLabs/fb1dfb3a12f730f5c070c5d91753ed4d to your computer and use it in GitHub Desktop.
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