#2622 closed defect (bug) (fixed)
Function bp_get_loggedin_user_nav does not highlight active nav item
| Reported by: | gzeidan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | Core | Version: | |
| Severity: | Keywords: | ||
| Cc: |
Description
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"';
else
$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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [3238]) Fixes #2622 (1.2 branch) props gzeidan