Changeset 375 for trunk/bp-core/bp-core-templatetags.php
- Timestamp:
- 10/09/2008 04:37:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r359 r375 22 22 */ 23 23 function bp_get_nav() { 24 global $bp ;24 global $bp, $current_blog; 25 25 26 26 /* Sort the nav by key as the array has been put together in different locations */ … … 30 30 foreach( (array) $bp['bp_nav'] as $nav_item ) { 31 31 /* If the current component matches the nav item id, then add a highlight CSS class. */ 32 if ( $bp['current_component'] == $nav_item['css_id'] && $bp['current_userid'] == $bp['loggedin_userid']) {32 if ( $bp['current_component'] == $nav_item['css_id'] && bp_is_home() ) { 33 33 $selected = ' class="current"'; 34 34 } else { … … 39 39 then check to see if the two users are friends. if they are, add a highligh CSS class 40 40 to the friends nav item if it exists. */ 41 if ( $bp['current_userid'] != $bp['loggedin_userid']) {41 if ( !bp_is_home() ) { 42 42 if ( function_exists('friends_check_friendship') ) { 43 43 if ( friends_check_friendship( $bp['current_userid'] ) == 'is_friend' && $nav_item['css_id'] == $bp['friends']['slug'] ) { … … 54 54 55 55 /* Always add a log out list item to the end of the navigation */ 56 echo '<li><a id="wp-logout" href="' . get_option('home') . '/wp-login.php?action=logout">Log Out</a><li>';56 echo '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout">Log Out</a><li>'; 57 57 } 58 58 … … 301 301 } 302 302 303 function bp_loggedinuser_link() { 304 global $bp; 305 echo bp_core_get_userlink( $bp['loggedin_userid'] ); 306 } 307 303 308 /* Template functions for fetching globals, without querying the DB again 304 309 also means we dont have to use the $bp variable in the template (looks messy) */
Note: See TracChangeset
for help on using the changeset viewer.