public

Buddyperss - How to remove "Favorite" function from Buddypress

  • Download Gist
bp_remove_favorites_functionality.php
PHP
1 2 3 4 5 6 7 8 9 10
 
add_filter( 'bp_activity_can_favorite', '__return_false' );
add_filter( 'bp_get_total_favorite_count_for_user', '__return_false' );
 
function bp_admin_bar_render_remove_favorites() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('my-account-activity-favorites');
}
add_action( 'wp_before_admin_bar_render', 'bp_admin_bar_render_remove_favorites' );

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.