[buddypress-trac] [BuddyPress Trac] #8471: bp_core_new_nav_default() function is useless

buddypress-trac noreply at wordpress.org
Mon May 10 20:48:18 UTC 2021


#8471: bp_core_new_nav_default() function is useless
--------------------------+--------------------
 Reporter:  imath         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  8.0.0
Component:  Core          |    Version:  2.6.0
 Severity:  normal        |   Keywords:
--------------------------+--------------------
 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.

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


More information about the buddypress-trac mailing list