From 2812bf62634dbdebf1a2d089827b68a86a036cc0 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 25 Apr 2016 13:42:03 -0500 Subject: [PATCH] Show the Papers tab in all groups, regardless of whether the group has papers. --- includes/hooks-buddypress-group.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/includes/hooks-buddypress-group.php b/includes/hooks-buddypress-group.php index 7e841c3..8764716 100644 --- a/includes/hooks-buddypress-group.php +++ b/includes/hooks-buddypress-group.php @@ -570,25 +570,6 @@ function cacsp_get_group_links_for_paper( $paper_id ) { return $show_groups; } -/** - * Remove the Groups nav menu item if there are no papers in the group. - * - * Would like to do this in the BP_Group_Extension constructor, but the taxonomy is not registered in time. - * - * @since 1.0.0 - */ -function cacsp_maybe_remove_papers_from_group_nav() { - if ( ! bp_is_group () ) { - return; - } - - $papers_of_group = cacsp_get_papers_of_group( bp_get_current_group_id() ); - if ( ! $papers_of_group ) { - bp_core_remove_subnav_item( bp_get_current_group_slug(), 'papers' ); - } -} -add_action( 'bp_actions', 'cacsp_maybe_remove_papers_from_group_nav' ); - /** * Add group information to the paper meta area. *