Opened 5 years ago
Closed 5 years ago
#8471 closed defect (bug) (fixed)
bp_core_new_nav_default() function is useless
| Reported by: | imath | Owned by: | imath |
|---|---|---|---|
| Priority: | normal | Milestone: | 10.0.0 |
| Component: | Core | Version: | 2.6.0 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
Reviewing 8139.current-action.patch about #8139 I've found, using bp_core_new_nav_default() function is making the BP Component hardcoded Default subnav unusable.
To reproduce, add a new bp-custom.php file with this code:
function bp_activity_component_new_default_subnav() {
bp_core_new_nav_default(
array(
'parent_slug' => bp_get_activity_slug(),
'screen_function' => 'bp_activity_screen_mentions',
'subnav_slug' => 'mentions'
)
);
}
add_action( 'bp_init', 'bp_activity_component_new_default_subnav', 2000 );
When you go to the Activity user's primary nav, you will reach the mentions subnav. But then the just-me subnav can't be reached anymore (even if you add it manually to the URL).
I've explored the bp_core_new_nav_default() function and I have started to build a patch. It needs to be completed for components != Activity.
Maybe it's a bit late to include it for 8.0.0. But I'd like we talk about this ticket at least before eventually punting it.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
We need more testing about this change.