Skip to:

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2622 closed defect (bug) (fixed)

Function bp_get_loggedin_user_nav does not highlight active nav item

Reported by: gzeidan's profile gzeidan Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Core Keywords:


There is an error in the function bp_get_loggedin_user_nav on the file: /buddypress/bp-core/bp-core-templatetags.php

It is missing the use of brackets while invoking the function bp_is_directory.

See below an extract of the code:

	/* Loop through each navigation item */
	foreach( (array) $bp->bp_nav as $nav_item ) {
		/* If the current component matches the nav item id, then add a highlight CSS class. */
		if ( !bp_is_directory && $bp->active_components[$bp->current_component] == $nav_item['css_id'] )
			$selected = ' class="current selected"';
			$selected = '';

After replacing "!bp_is_directory" with "!bp_is_directory()" everything started working fine.

This error is causing the function not to highlight the active nav item appropriately.

Change History (2)

#1 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3238]) Fixes #2622 (1.2 branch) props gzeidan

#2 @johnjamesjacoby
14 years ago

(In [3239]) Fixes #2622 (trunk) props gzeidan (see r2698)

Note: See TracTickets for help on using tickets.