[buddypress-trac] [BuddyPress Trac] #6214: Don't show "Favorites" menu point if favorites are disabled

buddypress-trac noreply at wordpress.org
Wed Feb 11 17:44:27 UTC 2015

#6214: Don't show "Favorites" menu point if favorites are disabled
 Reporter:  wpdennis              |      Owner:
     Type:  enhancement           |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  Component - Activity  |    Version:
 Severity:  normal                |   Keywords:  2nd-opinion
 If I disable favorites like this:

 add_filter('bp_activity_can_favorite', function() {
     return false;

 the favorites menu point under activities is still available. I think it
 should be removed implicitly, even if there are favorites "from the past".
 The user experience should be consistent and if I can't favorise
 something, I shouldn't have a menu point for it.

 If someone googles for this and needs a quick solution, this hook removes
 the menu point:

 add_action('bp_activity_setup_nav', function() {
     $bp = buddypress();
     if (isset($bp->bp_options_nav['activity']) and

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6214>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list