Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/09/2008 04:37:49 AM (17 years ago)
Author:
apeatling
Message:
  • Moved all group pages to the root, rather than using a member URL
  • Introduced groupmeta support - groups_update_groupmeta / groups_delete_groupmeta / groups_get_groupmeta
  • Added widgets for site wide activity and who's online
  • Updated home theme to support display of new BuddyPress widgets
  • Added site wide activity feed support
  • Fixed bug where ajax functions would only work when logged in
  • Various other bug fixes
File:
1 edited

Legend:

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

    r359 r375  
    2222 */
    2323function bp_get_nav() {
    24     global $bp;
     24    global $bp, $current_blog;
    2525   
    2626    /* Sort the nav by key as the array has been put together in different locations */
     
    3030    foreach( (array) $bp['bp_nav'] as $nav_item ) {
    3131        /* 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() ) {
    3333            $selected = ' class="current"';
    3434        } else {
     
    3939           then check to see if the two users are friends. if they are, add a highligh CSS class
    4040           to the friends nav item if it exists. */
    41         if ( $bp['current_userid'] != $bp['loggedin_userid'] ) {
     41        if ( !bp_is_home() ) {
    4242            if ( function_exists('friends_check_friendship') ) {
    4343                if ( friends_check_friendship( $bp['current_userid'] ) == 'is_friend' && $nav_item['css_id'] == $bp['friends']['slug'] ) {
     
    5454   
    5555    /* 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>';
    5757}
    5858
     
    301301}
    302302
     303function bp_loggedinuser_link() {
     304    global $bp;
     305    echo bp_core_get_userlink( $bp['loggedin_userid'] );
     306}
     307
    303308/* Template functions for fetching globals, without querying the DB again
    304309   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.