[buddypress-trac] [BuddyPress] #4772: Duplicate sub nav 1.7 when using bp_core_new_subnav_item

buddypress-trac noreply at wordpress.org
Wed Jan 16 21:06:57 UTC 2013


#4772: Duplicate sub nav 1.7 when using bp_core_new_subnav_item
--------------------------+-----------------------------
 Reporter:  modemlooper   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.7
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 When you add a subnav to a profile tab it is duplicating the entire
 subnav. I'm using code below. This code does not duplicate subnav on
 1.6.3.


 {{{
 function bp_setup_sub_nav() {
         global $bp;

                 // Add a nav item for this
         bp_core_new_subnav_item( array(
                 'name' => __( 'Subnav', 'bp-subnav' ),
                 'slug' => 'subnav',
                 'parent_slug' => $bp->settings->slug,
                 'parent_url' => $bp->displayed_user->domain .
 $bp->settings->slug . '/',
                 'screen_function' => 'bp_subnav_settings_menu',
                 'position' => 40,
                 'user_has_access' => bp_is_my_profile() // Only the logged
 in user and admin can access this on his/her profile
         ) );
 }
 add_action( 'bp_setup_nav', 'bp_setup_sub_nav');
 }}}

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


More information about the buddypress-trac mailing list