Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/31/2010 09:45:19 AM (14 years ago)
Author:
apeatling
Message:

Improved noscript support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2480 r2485  
    514514    global $bp;
    515515
    516     /***
    517      * Only render this navigation when the logged in user is looking at one of their own pages, or we are using it to display nav
    518      * menus for something like a group, or event.
    519      */
    520     if ( bp_is_my_profile() || $bp->is_single_item ) {
    521         if ( count( $bp->bp_options_nav[$bp->current_component] ) < 1 )
    522             return false;
    523 
    524         /* Loop through each navigation item */
    525         foreach ( $bp->bp_options_nav[$bp->current_component] as $subnav_item ) {
    526             if ( !$subnav_item['user_has_access'] )
    527                 continue;
    528 
    529             /* If the current action or an action variable matches the nav item id, then add a highlight CSS class. */
    530             if ( $subnav_item['slug'] == $bp->current_action ) {
    531                 $selected = ' class="current selected"';
    532             } else {
    533                 $selected = '';
    534             }
    535 
    536             /* echo out the final list item */
    537             echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="' . $subnav_item['css_id'] . '-personal-li" ' . $selected . '><a id="' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>', $subnav_item );
     516    if ( count( $bp->bp_options_nav[$bp->current_component] ) < 1 )
     517        return false;
     518
     519    /* Loop through each navigation item */
     520    foreach ( $bp->bp_options_nav[$bp->current_component] as $subnav_item ) {
     521        if ( !$subnav_item['user_has_access'] )
     522            continue;
     523
     524        /* If the current action or an action variable matches the nav item id, then add a highlight CSS class. */
     525        if ( $subnav_item['slug'] == $bp->current_action ) {
     526            $selected = ' class="current selected"';
     527        } else {
     528            $selected = '';
    538529        }
    539     } else {
    540         /* If we're using the classic template structure, show the displayed user nav instead */
    541         if ( 'bp-sn-parent' == basename( TEMPLATEPATH ) || defined( 'BP_CLASSIC_TEMPLATE_STRUCTURE' ) )
    542             bp_get_displayed_user_nav();
     530
     531        /* echo out the final list item */
     532        echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="' . $subnav_item['css_id'] . '-personal-li" ' . $selected . '><a id="' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>', $subnav_item );
    543533    }
    544534}
Note: See TracChangeset for help on using the changeset viewer.