Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 3 of Ticket #4837


Ignore:
Timestamp:
02/20/2013 12:17:58 AM (14 years ago)
Author:
boonebgorges
Comment:

OK, thanks for the additional information.

I've done some investigation, and it turns out that this is not actually related to theme compat at all (or plugins.php for that matter). The problem is that the sample plugin is not using the 'default_subnav_slug' parameter when registering the nav item with bp_core_new_nav_item(). If you do this, it works:

bp_core_new_nav_item( array(
		'name' => __( 'SubNav', 'bp-subnavy' ),
		'slug' => 'subnav',
		'screen_function' => 'bp_subnav_screen_settings_menu',
                'default_subnav_slug' => 'subnav',
		'position' => 40,
		'user_has_access' => bp_is_my_profile()
	) );

This is kind of a quirk in the way that bp_core_new_nav_item() works. (See ​http://buddypress.trac.wordpress.org/browser/tags/1.6.4/bp-core/bp-core-buddybar.php#L87 to see why.) In the future, it would be nice to refactor this function a bit so that this requirement is not in place - there are other reasons to want to refactor this function anyway.

For now, this is not a regression, and it can easily be avoided by using the default_subnav_slug item. I'll update the ticket title appropriately. Could you please pass this along back the OP on the forums?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4837

    • Property Milestone Awaiting Review → Future Release
    • Property Priority normal → low
    • Property Severity major → minor
    • Property Summary using bp_core_new_nav_item and plugins.php borked → Leaving out the default_subnav_slug param in bp_core_new_nav_item() breaks the new tab display
    • Property Type defect (bug) → enhancement
  • Ticket #4837 – Description

    initial v3  
    22
    33adding a nav item to user nav with bp_core_new_nav_item adds the item but when you visit the url it shows the members list displaying the users friends. It's not showing the profile header but the members directory.
     4
     5[Edit - see comment:3 below for more explanation of what's happening]