diff --git src/bp-core/bp-core-buddybar.php src/bp-core/bp-core-buddybar.php
index a854fd3..a3f40a1 100644
|
|
function bp_core_new_subnav_item( $args = '' ) { |
295 | 295 | if ( empty( $item_css_id ) ) |
296 | 296 | $item_css_id = $slug; |
297 | 297 | |
| 298 | // In case of a single group, if the parent url doesn't concern the groups component, |
| 299 | // don't create the submenu |
| 300 | if ( bp_is_group() && bp_is_active( 'groups' ) ) { |
| 301 | |
| 302 | $groups_root_slug = bp_get_groups_root_slug(); |
| 303 | |
| 304 | if ( ! preg_match( "/$groups_root_slug/", $parent_url ) ) { |
| 305 | return false; |
| 306 | } |
| 307 | } |
| 308 | |
298 | 309 | $subnav_item = array( |
299 | 310 | 'name' => $name, |
300 | 311 | 'link' => trailingslashit( $link ), |